diff --git a/nix-darwin/services/nix-daemon.nix b/nix-darwin/services/nix-daemon.nix index 561d24e..9c8f2bb 100644 --- a/nix-darwin/services/nix-daemon.nix +++ b/nix-darwin/services/nix-daemon.nix @@ -1,5 +1,8 @@ -{ config, pkgs, scriptPath ? "/opt/nix-daemon.sh", ... }: +{ config, pkgs, ... }: +let + fullScriptPath = "/opt/nix-daemon.sh"; +in { home.file."Library/LaunchAgents/org.nixos.autostart.plist" = { text = '' @@ -12,7 +15,7 @@ ProgramArguments ${pkgs.bash}/bin/bash - ${scriptPath} + ${fullScriptPath} RunAtLoad @@ -23,7 +26,7 @@ ''; }; - home.file."${scriptPath}" = { + home.file."${fullScriptPath}" = { text = '' if [ -e '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' ]; then . '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh'