From 2acea86583ba10b67b36db135c94d6df1ae41d55 Mon Sep 17 00:00:00 2001 From: midchildan Date: Thu, 23 Mar 2023 01:52:18 +0900 Subject: [PATCH] launchd: make Launch Agents config a freeform setting Because there probably are options we don't know about. --- modules/launchd/launchd.nix | 2 ++ tests/modules/launchd/agents.nix | 1 + tests/modules/launchd/expected-agent.plist | 2 ++ 3 files changed, 5 insertions(+) diff --git a/modules/launchd/launchd.nix b/modules/launchd/launchd.nix index 2e0e6585..27ddbf42 100644 --- a/modules/launchd/launchd.nix +++ b/modules/launchd/launchd.nix @@ -28,6 +28,8 @@ with lib; { + freeformType = with types; attrsOf anything; # added by Home Manager + options = { Label = mkOption { type = types.str; diff --git a/tests/modules/launchd/agents.nix b/tests/modules/launchd/agents.nix index cbcff6b5..ccf4f6e2 100644 --- a/tests/modules/launchd/agents.nix +++ b/tests/modules/launchd/agents.nix @@ -13,6 +13,7 @@ with lib; SuccessfulExit = false; }; ProcessType = "Background"; + UnrecognizedByHomeManager = "should make it to the resulting plist"; }; }; diff --git a/tests/modules/launchd/expected-agent.plist b/tests/modules/launchd/expected-agent.plist index c56ad4da..890b9933 100644 --- a/tests/modules/launchd/expected-agent.plist +++ b/tests/modules/launchd/expected-agent.plist @@ -19,5 +19,7 @@ --with-arguments foo + UnrecognizedByHomeManager + should make it to the resulting plist \ No newline at end of file