Merge pull request #244323 from SuperSandro2000/nexus

authored by Sandro and committed by GitHub 2a2c6aeb 69deaa75

+4 -18
+4 -18
nixos/modules/services/web-apps/nexus.nix
··· 12 12 services.nexus = { 13 13 enable = mkEnableOption (lib.mdDoc "Sonatype Nexus3 OSS service"); 14 14 15 - package = mkOption { 16 - type = types.package; 17 - default = pkgs.nexus; 18 - defaultText = literalExpression "pkgs.nexus"; 19 - description = lib.mdDoc "Package which runs Nexus3"; 20 - }; 15 + package = lib.mkPackageOption pkgs "nexus" { }; 21 16 22 - jdkPackage = mkOption { 23 - type = types.package; 24 - default = pkgs.openjdk8; 25 - defaultText = literalExample "pkgs.openjdk8"; 26 - example = literalExample "pkgs.openjdk8"; 27 - description = '' 28 - The JDK package to use. 29 - ''; 30 - }; 17 + jdkPackage = lib.mkPackageOption pkgs "openjdk8" { }; 31 18 32 19 user = mkOption { 33 20 type = types.str; ··· 114 101 config = mkIf cfg.enable { 115 102 users.users.${cfg.user} = { 116 103 isSystemUser = true; 117 - group = cfg.group; 118 - home = cfg.home; 104 + inherit (cfg) group home; 119 105 createHome = true; 120 106 }; 121 107 ··· 132 118 NEXUS_USER = cfg.user; 133 119 NEXUS_HOME = cfg.home; 134 120 135 - INSTALL4J_JAVA_HOME = "${cfg.jdkPackage}"; 121 + INSTALL4J_JAVA_HOME = cfg.jdkPackage; 136 122 VM_OPTS_FILE = pkgs.writeText "nexus.vmoptions" cfg.jvmOpts; 137 123 }; 138 124