diff options
Diffstat (limited to 'modules/launchd')
| -rw-r--r-- | modules/launchd/default.nix | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/modules/launchd/default.nix b/modules/launchd/default.nix index cbcac9c..f82df2a 100644 --- a/modules/launchd/default.nix +++ b/modules/launchd/default.nix @@ -88,7 +88,7 @@ let ${config.script} ''); - serviceConfig.Label = mkDefault "org.nixos.${name}"; + serviceConfig.Label = mkDefault "${cfg.labelPrefix}.${name}"; serviceConfig.ProgramArguments = mkIf (cmd != "") [ "/bin/sh" "-c" "exec ${cmd}" ]; serviceConfig.EnvironmentVariables = mkIf (env != {}) env; }; @@ -97,6 +97,15 @@ in { options = { + launchd.labelPrefix = mkOption { + type = types.str; + default = "org.nixos"; + description = '' + The default prefix of the service label. Individual services can + override this by setting the Label attribute. + ''; + }; + launchd.envVariables = mkOption { type = types.attrsOf (types.either types.str (types.listOf types.str)); default = {}; |
