depot/third_party/home-manager/tests/modules/launchd/agents.nix
Default email 2eafb8192e Project import generated by Copybara.
GitOrigin-RevId: 176e455371a8371586e8a3ff0d56ee9f3ca2324e
2023-01-10 02:35:00 -07:00

25 lines
557 B
Nix

{ config, lib, pkgs, ... }:
with lib;
{
config = {
launchd.agents."test-service" = {
enable = true;
config = {
ProgramArguments = [ "/some/command" "--with-arguments" "foo" ];
KeepAlive = {
Crashed = true;
SuccessfulExit = false;
};
ProcessType = "Background";
};
};
nmt.script = ''
serviceFile=LaunchAgents/org.nix-community.home.test-service.plist
assertFileExists $serviceFile
assertFileContent $serviceFile ${./expected-agent.plist}
'';
};
}