From 11e4f927038ba5eb0163de40c2f12facccb4988f Mon Sep 17 00:00:00 2001 From: Daniel Beecham Date: Fri, 23 Jan 2026 22:03:55 +0100 Subject: [PATCH] nixos/soft-serve: specify config path in env instead of systemd.tmpfiles When config location is in systemd tmpfiles, if you nuke the configuration directory (`rm -rf /var/lib/private/soft-serve`) and then restart the service, the configuration file will not be set, and the service uses default configurations. Having the configuration file in env also removes the need to use 'restartTriggers'. --- nixos/modules/services/misc/soft-serve.nix | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/nixos/modules/services/misc/soft-serve.nix b/nixos/modules/services/misc/soft-serve.nix index 0c34d27d7542..0704287862a2 100644 --- a/nixos/modules/services/misc/soft-serve.nix +++ b/nixos/modules/services/misc/soft-serve.nix @@ -45,11 +45,6 @@ in config = lib.mkIf cfg.enable { - systemd.tmpfiles.rules = [ - # The config file has to be inside the state dir - "L+ ${stateDir}/config.yaml - - - - ${configFile}" - ]; - systemd.services.soft-serve = { description = "Soft Serve git server"; documentation = [ docUrl ]; @@ -58,8 +53,7 @@ in wantedBy = [ "multi-user.target" ]; environment.SOFT_SERVE_DATA_PATH = stateDir; - - restartTriggers = [ configFile ]; + environment.SOFT_SERVE_CONFIG_LOCATION = configFile; serviceConfig = { Type = "simple";