From b317daf271c26de054685f27d012712da275b376 Mon Sep 17 00:00:00 2001 From: Yechiel Worenklein <41305372+yechielw@users.noreply.github.com> Date: Thu, 16 Oct 2025 17:41:23 +0100 Subject: [PATCH] nixos/pinchflat: make TZ variable optional This is to prvent an error while building time.timeZone is set to null (default) --- nixos/modules/services/misc/pinchflat.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/misc/pinchflat.nix b/nixos/modules/services/misc/pinchflat.nix index a4eee7463697..e33fb88cef63 100644 --- a/nixos/modules/services/misc/pinchflat.nix +++ b/nixos/modules/services/misc/pinchflat.nix @@ -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"}";