From 55d9a2c596f08a355c2adaeb5c3225f71bb7a5d5 Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Sat, 10 Sep 2022 21:10:06 +0100 Subject: [PATCH] nixos/paperless: fix time.timeZone setting This attribute set isn't passed through the NixOS config resolution mechanism, which means that we can't use lib.mkDefault here. Instead, just put it before any user overrides so that if the user specifies this environment variable it'll just override it anyway. --- nixos/modules/services/misc/paperless.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/nixos/modules/services/misc/paperless.nix b/nixos/modules/services/misc/paperless.nix index 0a62af95f8f1..b3b1d265c19e 100644 --- a/nixos/modules/services/misc/paperless.nix +++ b/nixos/modules/services/misc/paperless.nix @@ -16,13 +16,13 @@ let PAPERLESS_MEDIA_ROOT = cfg.mediaDir; PAPERLESS_CONSUMPTION_DIR = cfg.consumptionDir; GUNICORN_CMD_ARGS = "--bind=${cfg.address}:${toString cfg.port}"; - } // ( - lib.mapAttrs (_: toString) cfg.extraConfig - ) // optionalAttrs (config.time.timeZone != null) { - PAPERLESS_TIME_ZONE = lib.mkDefault config.time.timeZone; + } // optionalAttrs (config.time.timeZone != null) { + PAPERLESS_TIME_ZONE = config.time.timeZone; } // optionalAttrs enableRedis { PAPERLESS_REDIS = "unix://${redisServer.unixSocket}"; - }; + } // ( + lib.mapAttrs (_: toString) cfg.extraConfig + ); manage = let setupEnv = lib.concatStringsSep "\n" (mapAttrsToList (name: val: "export ${name}=\"${val}\"") env);