From ec59929c9f6eb2f109b93c5a517cfcbc10f31a30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Forsman?= Date: Fri, 12 Sep 2014 15:22:25 +0200 Subject: [PATCH] nixos/jekins: add services.jenkins.extraGroups option This makes it easy to give jenkins extra privileges by adding group memberships. Use with care :-) --- .../continuous-integration/jenkins/default.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/nixos/modules/services/continuous-integration/jenkins/default.nix b/nixos/modules/services/continuous-integration/jenkins/default.nix index 7418be1c6ba..29a81f066ab 100644 --- a/nixos/modules/services/continuous-integration/jenkins/default.nix +++ b/nixos/modules/services/continuous-integration/jenkins/default.nix @@ -30,6 +30,15 @@ in { ''; }; + extraGroups = mkOption { + type = types.listOf types.str; + default = [ ]; + example = [ "wheel" "dialout" ]; + description = '' + List of extra groups that the "jenkins" user should be a part of. + ''; + }; + home = mkOption { default = "/var/lib/jenkins"; type = types.path; @@ -87,6 +96,7 @@ in { createHome = true; home = cfg.home; group = cfg.group; + extraGroups = cfg.extraGroups; useDefaultShell = true; uid = config.ids.uids.jenkins; };