3p/nixpkgs: fix paperless when timeZones are set

This commit is contained in:
Luke Granger-Brown 2022-09-10 20:16:41 +01:00
parent b450903751
commit fccddb3c6a
3 changed files with 22 additions and 3 deletions

View file

@ -16,11 +16,11 @@ let
PAPERLESS_MEDIA_ROOT = cfg.mediaDir;
PAPERLESS_CONSUMPTION_DIR = cfg.consumptionDir;
GUNICORN_CMD_ARGS = "--bind=${cfg.address}:${toString cfg.port}";
} // optionalAttrs (config.time.timeZone != null) {
PAPERLESS_TIME_ZONE = config.time.timeZone;
} // (
lib.mapAttrs (_: toString) cfg.extraConfig
) // optionalAttrs (config.time.timeZone != null) {
PAPERLESS_TIME_ZONE = lib.mkDefault config.time.timeZone;
} // optionalAttrs enableRedis {
) // optionalAttrs enableRedis {
PAPERLESS_REDIS = "unix://${redisServer.unixSocket}";
};

View file

@ -0,0 +1,18 @@
diff --git a/nixos/modules/services/misc/paperless.nix b/nixos/modules/services/misc/paperless.nix
--- a/nixos/modules/services/misc/paperless.nix
+++ b/nixos/modules/services/misc/paperless.nix
@@ -16,11 +16,11 @@ let
PAPERLESS_MEDIA_ROOT = cfg.mediaDir;
PAPERLESS_CONSUMPTION_DIR = cfg.consumptionDir;
GUNICORN_CMD_ARGS = "--bind=${cfg.address}:${toString cfg.port}";
+ } // optionalAttrs (config.time.timeZone != null) {
+ PAPERLESS_TIME_ZONE = config.time.timeZone;
} // (
lib.mapAttrs (_: toString) cfg.extraConfig
- ) // optionalAttrs (config.time.timeZone != null) {
- PAPERLESS_TIME_ZONE = lib.mkDefault config.time.timeZone;
- } // optionalAttrs enableRedis {
+ ) // optionalAttrs enableRedis {
PAPERLESS_REDIS = "unix://${redisServer.unixSocket}";
};

View file

@ -0,0 +1 @@
paperless-no-you-cant-do-that.patch