nixos/jenkinsSlave: remove with lib;
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
with lib;
|
|
||||||
let
|
let
|
||||||
|
inherit (lib) mkIf mkOption types;
|
||||||
cfg = config.services.jenkinsSlave;
|
cfg = config.services.jenkinsSlave;
|
||||||
masterCfg = config.services.jenkins;
|
masterCfg = config.services.jenkins;
|
||||||
in {
|
in {
|
||||||
@@ -47,16 +48,16 @@ in {
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
javaPackage = mkPackageOption pkgs "jdk" { };
|
javaPackage = lib.mkPackageOption pkgs "jdk" { };
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf (cfg.enable && !masterCfg.enable) {
|
config = mkIf (cfg.enable && !masterCfg.enable) {
|
||||||
users.groups = optionalAttrs (cfg.group == "jenkins") {
|
users.groups = lib.optionalAttrs (cfg.group == "jenkins") {
|
||||||
jenkins.gid = config.ids.gids.jenkins;
|
jenkins.gid = config.ids.gids.jenkins;
|
||||||
};
|
};
|
||||||
|
|
||||||
users.users = optionalAttrs (cfg.user == "jenkins") {
|
users.users = lib.optionalAttrs (cfg.user == "jenkins") {
|
||||||
jenkins = {
|
jenkins = {
|
||||||
description = "jenkins user";
|
description = "jenkins user";
|
||||||
createHome = true;
|
createHome = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user