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>
This commit is contained in:
parent
20a9e5cfe9
commit
aeeb655646
@ -35,6 +35,12 @@ let
|
|||||||
type = lib.types.str;
|
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 {
|
runtimePackages = lib.mkOption {
|
||||||
default = [ pkgs.bash pkgs.gnutar pkgs.gzip pkgs.git pkgs.nix ];
|
default = [ pkgs.bash pkgs.gnutar pkgs.gzip pkgs.git pkgs.nix ];
|
||||||
defaultText = lib.literalExpression "[ 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;
|
home = cfg.dataDir;
|
||||||
createHome = true;
|
createHome = true;
|
||||||
description = "Buildkite agent user";
|
description = "Buildkite agent user";
|
||||||
extraGroups = [ "keys" ];
|
extraGroups = cfg.extraGroups;
|
||||||
isSystemUser = true;
|
isSystemUser = true;
|
||||||
group = "buildkite-agent-${name}";
|
group = "buildkite-agent-${name}";
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user