diff --git a/release.nix b/release.nix index 8445f2f..ae282cd 100644 --- a/release.nix +++ b/release.nix @@ -92,6 +92,7 @@ let tests.activation-scripts = makeTest ./tests/activation-scripts.nix; tests.checks-nix-gc = makeTest ./tests/checks-nix-gc.nix; tests.environment-path = makeTest ./tests/environment-path.nix; + tests.launchd-daemons = makeTest ./tests/launchd-daemons.nix; tests.launchd-setenv = makeTest ./tests/launchd-setenv.nix; tests.networking-hostname = makeTest ./tests/networking-hostname.nix; tests.networking-networkservices = makeTest ./tests/networking-networkservices.nix; diff --git a/tests/launchd-daemons.nix b/tests/launchd-daemons.nix new file mode 100644 index 0000000..59e35aa --- /dev/null +++ b/tests/launchd-daemons.nix @@ -0,0 +1,17 @@ +{ config, pkgs, ... }: + +{ + launchd.daemons.foo.command = "foo"; + launchd.agents.bar.command = "bar"; + launchd.user.agents.baz.command = "baz"; + + test = '' + echo "checking launchd load in /activate" >&2 + grep "launchctl load .* '/Library/LaunchDaemons/org.nixos.foo.plist" ${config.out}/activate + grep "launchctl load .* '/Library/LaunchAgents/org.nixos.bar.plist" ${config.out}/activate + echo "checking launchd load in /activate-user" >&2 + grep "launchctl load .* ~/Library/LaunchAgents/org.nixos.baz.plist" ${config.out}/activate-user + echo "checking LaunchAgents creation /activate-user" >&2 + grep "mkdir -p ~/Library/LaunchAgents" ${config.out}/activate-user + ''; +}