Skip to content

Commit

Permalink
nixos/jenkinsSlave: remove with lib; (#343514)
Browse files Browse the repository at this point in the history
  • Loading branch information
Atemu committed Sep 27, 2024
2 parents e8d40a7 + fdf0199 commit 3913c72
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{ config, lib, pkgs, ... }:
with lib;

let
inherit (lib) mkIf mkOption types;
cfg = config.services.jenkinsSlave;
masterCfg = config.services.jenkins;
in {
Expand Down Expand Up @@ -47,16 +48,16 @@ in {
'';
};

javaPackage = mkPackageOption pkgs "jdk" { };
javaPackage = lib.mkPackageOption pkgs "jdk" { };
};
};

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;
};

users.users = optionalAttrs (cfg.user == "jenkins") {
users.users = lib.optionalAttrs (cfg.user == "jenkins") {
jenkins = {
description = "jenkins user";
createHome = true;
Expand Down

0 comments on commit 3913c72

Please sign in to comment.