lol

Apply suggestion

Co-authored-by: Aaron Andersen <aaron@fosslib.net>

+11 -7
+11 -7
nixos/modules/services/mail/goeland.nix
··· 40 40 services.goeland.settings.database = "${cfg.stateDir}/goeland.db"; 41 41 42 42 systemd.services.goeland = { 43 - serviceConfig = let confFile = tomlFormat.generate "config.toml" cfg.settings; in { 44 - ExecStart = "${pkgs.goeland}/bin/goeland run -c ${confFile}"; 45 - User = "goeland"; 46 - Group = "goeland"; 47 - StateDirectory = "goeland"; 48 - StateDirectoryMode = "0750"; 49 - }; 43 + serviceConfig = let confFile = tomlFormat.generate "config.toml" cfg.settings; in mkMerge [ 44 + { 45 + ExecStart = "${pkgs.goeland}/bin/goeland run -c ${confFile}"; 46 + User = "goeland"; 47 + Group = "goeland"; 48 + } 49 + (mkIf (cfg.stateDir == "/var/lib/goeland") { 50 + StateDirectory = "goeland"; 51 + StateDirectoryMode = "0750"; 52 + }) 53 + ]; 50 54 startAt = cfg.schedule; 51 55 }; 52 56