about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorLuke Granger-Brown <git@lukegb.com>2022-09-10 21:10:06 +0100
committerLuke Granger-Brown <git@lukegb.com>2022-09-11 15:01:47 +0100
commit55d9a2c596f08a355c2adaeb5c3225f71bb7a5d5 (patch)
tree4cd72a4b6fc040a8f06ddce6aea908e837541113 /nixos
parentaccf3b38d5e8f0745ed79f643a78a3f7b6ebb25e (diff)
downloadnixlib-55d9a2c596f08a355c2adaeb5c3225f71bb7a5d5.tar
nixlib-55d9a2c596f08a355c2adaeb5c3225f71bb7a5d5.tar.gz
nixlib-55d9a2c596f08a355c2adaeb5c3225f71bb7a5d5.tar.bz2
nixlib-55d9a2c596f08a355c2adaeb5c3225f71bb7a5d5.tar.lz
nixlib-55d9a2c596f08a355c2adaeb5c3225f71bb7a5d5.tar.xz
nixlib-55d9a2c596f08a355c2adaeb5c3225f71bb7a5d5.tar.zst
nixlib-55d9a2c596f08a355c2adaeb5c3225f71bb7a5d5.zip
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.
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/services/misc/paperless.nix10
1 files 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);