nixos/nexus: use mkPackageOption, cleanup
This fixes: trace: warning: literalExample is deprecated, use literalExpression instead, or use literalMD for a non-Nix description.
This commit is contained in:
parent
441a7276d7
commit
fe6304df54
1 changed files with 4 additions and 18 deletions
|
@ -12,22 +12,9 @@ in
|
|||
services.nexus = {
|
||||
enable = mkEnableOption (lib.mdDoc "Sonatype Nexus3 OSS service");
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.nexus;
|
||||
defaultText = literalExpression "pkgs.nexus";
|
||||
description = lib.mdDoc "Package which runs Nexus3";
|
||||
};
|
||||
package = lib.mkPackageOption pkgs "nexus" { };
|
||||
|
||||
jdkPackage = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.openjdk8;
|
||||
defaultText = literalExample "pkgs.openjdk8";
|
||||
example = literalExample "pkgs.openjdk8";
|
||||
description = ''
|
||||
The JDK package to use.
|
||||
'';
|
||||
};
|
||||
jdkPackage = lib.mkPackageOption pkgs "openjdk8" { };
|
||||
|
||||
user = mkOption {
|
||||
type = types.str;
|
||||
|
@ -114,8 +101,7 @@ in
|
|||
config = mkIf cfg.enable {
|
||||
users.users.${cfg.user} = {
|
||||
isSystemUser = true;
|
||||
group = cfg.group;
|
||||
home = cfg.home;
|
||||
inherit (cfg) group home;
|
||||
createHome = true;
|
||||
};
|
||||
|
||||
|
@ -132,7 +118,7 @@ in
|
|||
NEXUS_USER = cfg.user;
|
||||
NEXUS_HOME = cfg.home;
|
||||
|
||||
INSTALL4J_JAVA_HOME = "${cfg.jdkPackage}";
|
||||
INSTALL4J_JAVA_HOME = cfg.jdkPackage;
|
||||
VM_OPTS_FILE = pkgs.writeText "nexus.vmoptions" cfg.jvmOpts;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue