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
@ -12,22 +12,9 @@ in
|
|||||||
services.nexus = {
|
services.nexus = {
|
||||||
enable = mkEnableOption (lib.mdDoc "Sonatype Nexus3 OSS service");
|
enable = mkEnableOption (lib.mdDoc "Sonatype Nexus3 OSS service");
|
||||||
|
|
||||||
package = mkOption {
|
package = lib.mkPackageOption pkgs "nexus" { };
|
||||||
type = types.package;
|
|
||||||
default = pkgs.nexus;
|
|
||||||
defaultText = literalExpression "pkgs.nexus";
|
|
||||||
description = lib.mdDoc "Package which runs Nexus3";
|
|
||||||
};
|
|
||||||
|
|
||||||
jdkPackage = mkOption {
|
jdkPackage = lib.mkPackageOption pkgs "openjdk8" { };
|
||||||
type = types.package;
|
|
||||||
default = pkgs.openjdk8;
|
|
||||||
defaultText = literalExample "pkgs.openjdk8";
|
|
||||||
example = literalExample "pkgs.openjdk8";
|
|
||||||
description = ''
|
|
||||||
The JDK package to use.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
user = mkOption {
|
user = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
@ -114,8 +101,7 @@ in
|
|||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
users.users.${cfg.user} = {
|
users.users.${cfg.user} = {
|
||||||
isSystemUser = true;
|
isSystemUser = true;
|
||||||
group = cfg.group;
|
inherit (cfg) group home;
|
||||||
home = cfg.home;
|
|
||||||
createHome = true;
|
createHome = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -132,7 +118,7 @@ in
|
|||||||
NEXUS_USER = cfg.user;
|
NEXUS_USER = cfg.user;
|
||||||
NEXUS_HOME = cfg.home;
|
NEXUS_HOME = cfg.home;
|
||||||
|
|
||||||
INSTALL4J_JAVA_HOME = "${cfg.jdkPackage}";
|
INSTALL4J_JAVA_HOME = cfg.jdkPackage;
|
||||||
VM_OPTS_FILE = pkgs.writeText "nexus.vmoptions" cfg.jvmOpts;
|
VM_OPTS_FILE = pkgs.writeText "nexus.vmoptions" cfg.jvmOpts;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user