about summary refs log tree commit diff
path: root/modules/nixos/psd.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/nixos/psd.nix')
-rw-r--r--modules/nixos/psd.nix10
1 files changed, 6 insertions, 4 deletions
diff --git a/modules/nixos/psd.nix b/modules/nixos/psd.nix
index 77d3c66..eb5a1a8 100644
--- a/modules/nixos/psd.nix
+++ b/modules/nixos/psd.nix
@@ -20,7 +20,9 @@ in {
     };
 
     systemd.user = {
-      services = {
+      services = let
+        exe = getExe' pkgs.profile-sync-daemon "profile-sync-daemon";
+      in {
         psd = {
           unitConfig = {
             Description = "Profile-sync-daemon";
@@ -30,8 +32,8 @@ in {
           };
           serviceConfig = {
             RemainAfterExit = true;
-            ExecStart = "${pkgs.profile-sync-daemon}/bin/profile-sync-daemon startup";
-            ExecStop = "${pkgs.profile-sync-daemon}/bin/profile-sync-daemon unsync";
+            ExecStart = "${exe} startup";
+            ExecStop = "${exe} unsync";
           };
           wantedBy = ["graphical.target"];
         };
@@ -43,7 +45,7 @@ in {
             Wants = ["psd-resync.timer"];
             BindsTo = ["psd.service"];
           };
-          serviceConfig.ExecStart = "${pkgs.profile-sync-daemon}/bin/profile-sync-daemon resync";
+          serviceConfig.ExecStart = "${exe} resync";
           wantedBy = ["graphical.target"];
         };
       };

Consider giving Nix/NixOS a try! <3