summary refs log tree commit diff
path: root/nixos/modules/services/desktops
diff options
context:
space:
mode:
authorPavan Rikhi <pavan.rikhi+agit@gmail.com>2014-12-14 00:41:23 -0500
committerPavan Rikhi <pavan.rikhi+agit@gmail.com>2014-12-14 00:45:08 -0500
commit25da0e25185423abb5e38846362535d7b5b4092f (patch)
tree906a90ab42e00cc8671071b14ae8770d4e83d8ce /nixos/modules/services/desktops
parentbd0d1e836c92c197e384937cd906bdbdb058ffed (diff)
downloadnixlib-25da0e25185423abb5e38846362535d7b5b4092f.tar
nixlib-25da0e25185423abb5e38846362535d7b5b4092f.tar.gz
nixlib-25da0e25185423abb5e38846362535d7b5b4092f.tar.bz2
nixlib-25da0e25185423abb5e38846362535d7b5b4092f.tar.lz
nixlib-25da0e25185423abb5e38846362535d7b5b4092f.tar.xz
nixlib-25da0e25185423abb5e38846362535d7b5b4092f.tar.zst
nixlib-25da0e25185423abb5e38846362535d7b5b4092f.zip
profile-sync-daemon: refactor module
Diffstat (limited to 'nixos/modules/services/desktops')
-rw-r--r--nixos/modules/services/desktops/profile-sync-daemon.nix14
1 files changed, 7 insertions, 7 deletions
diff --git a/nixos/modules/services/desktops/profile-sync-daemon.nix b/nixos/modules/services/desktops/profile-sync-daemon.nix
index c662c5d0fa64..d66ecef2385a 100644
--- a/nixos/modules/services/desktops/profile-sync-daemon.nix
+++ b/nixos/modules/services/desktops/profile-sync-daemon.nix
@@ -6,18 +6,20 @@ let
   cfg = config.services.psd;
 
   configFile = ''
-    ${if cfg.users != [ ] then ''
+    ${optionalString (cfg.users != [ ]) ''
       USERS="${concatStringsSep " " cfg.users}"
-    '' else ""}
+    ''}
 
-    ${if cfg.browsers != [ ] then ''
+    ${optionalString (cfg.browsers != [ ]) ''
       BROWSERS="${concatStringsSep " " cfg.browsers}"
-    '' else ""}
+    ''}
 
     ${optionalString (cfg.volatile != "") "VOLATILE=${cfg.volatile}"}
     ${optionalString (cfg.daemonFile != "") "DAEMON_FILE=${cfg.daemonFile}"}
   '';
+
 in {
+
   options.services.psd = with types; {
     enable = mkOption {
       type = bool;
@@ -84,7 +86,6 @@ in {
   };
 
   config = mkIf cfg.enable {
-
     systemd = {
       services = {
         psd = {
@@ -103,7 +104,6 @@ in {
             Type = "oneshot";
             RemainAfterExit = "yes";
             ExecStart = "${pkgs.profile-sync-daemon}/bin/profile-sync-daemon sync";
-
             ExecStop = "${pkgs.profile-sync-daemon}/bin/profile-sync-daemon unsync";
           };
         };
@@ -124,7 +124,7 @@ in {
       };
 
       timers.psd-resync = {
-        description = "Timer for profile sync daemon - 1 Hour";
+        description = "Timer for profile sync daemon - ${cfg.resyncTimer}";
         partOf = [ "psd-resync.service" "psd.service" ];
 
         timerConfig = {