@@ -6,18 +6,20 @@ let
66 cfg = config.services.psd;
77
88 configFile = ''
9− ${if cfg.users != [ ] then ''
9+ ${optionalString (cfg.users != [ ]) ''
1010 USERS="${concatStringsSep " " cfg.users}"
11− '' else ""}
11+ ''}
1212
13− ${if cfg.browsers != [ ] then ''
13+ ${optionalString (cfg.browsers != [ ]) ''
1414 BROWSERS="${concatStringsSep " " cfg.browsers}"
15− '' else ""}
15+ ''}
1616
1717 ${optionalString (cfg.volatile != "") "VOLATILE=${cfg.volatile}"}
1818 ${optionalString (cfg.daemonFile != "") "DAEMON_FILE=${cfg.daemonFile}"}
1919 '';
20+
2021in {
22+
2123 options.services.psd = with types; {
2224 enable = mkOption {
2325 type = bool;
@@ -84,7 +86,6 @@ in {
8486 };
8587
8688 config = mkIf cfg.enable {
87−
8889 systemd = {
8990 services = {
9091 psd = {
@@ -103,7 +104,6 @@ in {
103104 Type = "oneshot";
104105 RemainAfterExit = "yes";
105106 ExecStart = "${pkgs.profile-sync-daemon}/bin/profile-sync-daemon sync";
106−
107107 ExecStop = "${pkgs.profile-sync-daemon}/bin/profile-sync-daemon unsync";
108108 };
109109 };
@@ -124,7 +124,7 @@ in {
124124 };
125125
126126 timers.psd-resync = {
127− description = "Timer for profile sync daemon - 1 Hour";
127+ description = "Timer for profile sync daemon - ${cfg.resyncTimer}";
128128 partOf = [ "psd-resync.service" "psd.service" ];
129129
130130 timerConfig = {