nixos/pinchflat: make TZ variable optional (#452647)

This commit is contained in:
h7x4
2025-10-17 15:02:20 +00:00
committed by GitHub
+1 -1
View File
@@ -147,7 +147,6 @@ in
StateDirectory = baseNameOf stateDir;
Environment = [
"PORT=${builtins.toString cfg.port}"
"TZ=${config.time.timeZone}"
"MEDIA_PATH=${cfg.mediaDir}"
"CONFIG_PATH=${stateDir}"
"DATABASE_PATH=${stateDir}/db/pinchflat.db"
@@ -160,6 +159,7 @@ in
"PHX_SERVER=true"
]
++ optional cfg.selfhosted [ "RUN_CONTEXT=selfhosted" ]
++ optional (!isNull config.time.timeZone) "TZ=${config.time.timeZone}"
++ attrValues (mapAttrs (name: value: name + "=" + builtins.toString value) cfg.extraConfig);
EnvironmentFile = optional (cfg.secretsFile != null) cfg.secretsFile;
ExecStartPre = "${lib.getExe' cfg.package "migrate"}";