0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 21:50:33 +03:00

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.
This commit is contained in:
Luke Granger-Brown 2022-09-10 21:10:06 +01:00
parent accf3b38d5
commit 55d9a2c596

View file

@ -16,13 +16,13 @@ let
PAPERLESS_MEDIA_ROOT = cfg.mediaDir; PAPERLESS_MEDIA_ROOT = cfg.mediaDir;
PAPERLESS_CONSUMPTION_DIR = cfg.consumptionDir; PAPERLESS_CONSUMPTION_DIR = cfg.consumptionDir;
GUNICORN_CMD_ARGS = "--bind=${cfg.address}:${toString cfg.port}"; GUNICORN_CMD_ARGS = "--bind=${cfg.address}:${toString cfg.port}";
} // ( } // optionalAttrs (config.time.timeZone != null) {
lib.mapAttrs (_: toString) cfg.extraConfig PAPERLESS_TIME_ZONE = config.time.timeZone;
) // optionalAttrs (config.time.timeZone != null) {
PAPERLESS_TIME_ZONE = lib.mkDefault config.time.timeZone;
} // optionalAttrs enableRedis { } // optionalAttrs enableRedis {
PAPERLESS_REDIS = "unix://${redisServer.unixSocket}"; PAPERLESS_REDIS = "unix://${redisServer.unixSocket}";
}; } // (
lib.mapAttrs (_: toString) cfg.extraConfig
);
manage = let manage = let
setupEnv = lib.concatStringsSep "\n" (mapAttrsToList (name: val: "export ${name}=\"${val}\"") env); setupEnv = lib.concatStringsSep "\n" (mapAttrsToList (name: val: "export ${name}=\"${val}\"") env);