about summary refs log tree commit diff
path: root/nixos/modules/services/continuous-integration
diff options
context:
space:
mode:
authorÅsmund Østvold <aos@resoptima.com>2023-12-01 11:10:28 +0100
committerÅsmund Østvold <aos@resoptima.com>2023-12-21 12:49:48 +0100
commitaeeb655646bf2561d6a8c1a801193ec1c10a174e (patch)
tree97f092f9ef0fffdbff5b8197024ffbc30db96cc7 /nixos/modules/services/continuous-integration
parent20a9e5cfe9c6237f3047e805b34a88254fff9da7 (diff)
service buildkite-agent: make it possible add groups to agent users
Only one extra group was add. Some times you want the agents users to
be member of other groups like 'docker'. This change make this possible.

Co-authored-by: Florian Klink <flokli@flokli.de>
Diffstat (limited to 'nixos/modules/services/continuous-integration')
-rw-r--r--nixos/modules/services/continuous-integration/buildkite-agents.nix8
1 files changed, 7 insertions, 1 deletions
diff --git a/nixos/modules/services/continuous-integration/buildkite-agents.nix b/nixos/modules/services/continuous-integration/buildkite-agents.nix
index a35ca4168074f..2e488f83d4c3b 100644
--- a/nixos/modules/services/continuous-integration/buildkite-agents.nix
+++ b/nixos/modules/services/continuous-integration/buildkite-agents.nix
@@ -35,6 +35,12 @@ let
         type = lib.types.str;
       };
 
+      extraGroups = lib.mkOption {
+        default = [ "keys" ];
+        description = lib.mdDoc "Groups the user for this buildkite agent should belong to";
+        type = lib.types.listOf lib.types.str;
+      };
+
       runtimePackages = lib.mkOption {
         default = [ pkgs.bash pkgs.gnutar pkgs.gzip pkgs.git pkgs.nix ];
         defaultText = lib.literalExpression "[ pkgs.bash pkgs.gnutar pkgs.gzip pkgs.git pkgs.nix ]";
@@ -150,7 +156,7 @@ in
       home = cfg.dataDir;
       createHome = true;
       description = "Buildkite agent user";
-      extraGroups = [ "keys" ];
+      extraGroups = cfg.extraGroups;
       isSystemUser = true;
       group = "buildkite-agent-${name}";
     };