Merge pull request #190717 from lukegb/paperless-tz

nixos/paperless: fix time.timeZone setting
This commit is contained in:
Luke Granger-Brown 2022-09-11 22:45:25 +01:00 committed by GitHub
commit 9974dcfc20
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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);