|
|
@ -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" = { |
|
|
|
home.file."Library/LaunchAgents/org.nixos.autostart.plist" = { |
|
|
|
text = '' |
|
|
|
text = '' |
|
|
@ -12,7 +15,7 @@ |
|
|
|
<key>ProgramArguments</key> |
|
|
|
<key>ProgramArguments</key> |
|
|
|
<array> |
|
|
|
<array> |
|
|
|
<string>${pkgs.bash}/bin/bash</string> |
|
|
|
<string>${pkgs.bash}/bin/bash</string> |
|
|
|
<string>${scriptPath}</string> |
|
|
|
<string>${fullScriptPath}</string> |
|
|
|
</array> |
|
|
|
</array> |
|
|
|
<key>RunAtLoad</key> |
|
|
|
<key>RunAtLoad</key> |
|
|
|
<true/> |
|
|
|
<true/> |
|
|
@ -23,7 +26,7 @@ |
|
|
|
''; |
|
|
|
''; |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
home.file."${scriptPath}" = { |
|
|
|
home.file."${fullScriptPath}" = { |
|
|
|
text = '' |
|
|
|
text = '' |
|
|
|
if [ -e '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' ]; then |
|
|
|
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' |
|
|
|
. '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' |
|
|
|