diff options
| author | Wael M. Nasreddine <wael@keeptruckin.com> | 2020-04-14 14:53:31 -0700 |
|---|---|---|
| committer | Wael M. Nasreddine <wael.nasreddine@gmail.com> | 2020-04-14 15:01:37 -0700 |
| commit | cee84f4ea04d0ce3a6dc1f2c34d09a0ae5beed95 (patch) | |
| tree | 218fe513d6e572e26bc5655e30d4a627b795bca0 /modules/launchd | |
| parent | 053f2cb9cb0ce7ceb4933cbd76e2d28713ad85da (diff) | |
launchd: allow customization of the default launchd prefix
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 = {}; |
