mirror of https://github.com/E-Almqvist/dotfiles
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
944 B
35 lines
944 B
{ config, pkgs, scriptPath ? "/opt/nix-daemon.sh", ... }:
|
|
|
|
{
|
|
home.file."Library/LaunchAgents/org.nixos.autostart.plist" = {
|
|
text = ''
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
<plist version="1.0">
|
|
<dict>
|
|
<key>Label</key>
|
|
<string>org.nixos.autostart</string>
|
|
<key>ProgramArguments</key>
|
|
<array>
|
|
<string>${pkgs.bash}/bin/bash</string>
|
|
<string>${scriptPath}</string>
|
|
</array>
|
|
<key>RunAtLoad</key>
|
|
<true/>
|
|
<key>KeepAlive</key>
|
|
<false/>
|
|
</dict>
|
|
</plist>
|
|
'';
|
|
};
|
|
|
|
home.file."${scriptPath}" = {
|
|
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'
|
|
fi
|
|
'';
|
|
executable = true;
|
|
};
|
|
}
|
|
|
|
|