nixos/nexus: allow overriding the package
Useful when pulling nixos-unstable in a stable NixOS installation.
This commit is contained in:
parent
274bb96073
commit
783eb8438a
@ -13,6 +13,12 @@ in
|
|||||||
services.nexus = {
|
services.nexus = {
|
||||||
enable = mkEnableOption "Sonatype Nexus3 OSS service";
|
enable = mkEnableOption "Sonatype Nexus3 OSS service";
|
||||||
|
|
||||||
|
package = mkOption {
|
||||||
|
type = types.package;
|
||||||
|
default = pkgs.nexus;
|
||||||
|
description = "Package which runs Nexus3";
|
||||||
|
};
|
||||||
|
|
||||||
user = mkOption {
|
user = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
default = "nexus";
|
default = "nexus";
|
||||||
@ -55,10 +61,10 @@ in
|
|||||||
-XX:LogFile=${cfg.home}/nexus3/log/jvm.log
|
-XX:LogFile=${cfg.home}/nexus3/log/jvm.log
|
||||||
-XX:-OmitStackTraceInFastThrow
|
-XX:-OmitStackTraceInFastThrow
|
||||||
-Djava.net.preferIPv4Stack=true
|
-Djava.net.preferIPv4Stack=true
|
||||||
-Dkaraf.home=${pkgs.nexus}
|
-Dkaraf.home=${cfg.package}
|
||||||
-Dkaraf.base=${pkgs.nexus}
|
-Dkaraf.base=${cfg.package}
|
||||||
-Dkaraf.etc=${pkgs.nexus}/etc/karaf
|
-Dkaraf.etc=${cfg.package}/etc/karaf
|
||||||
-Djava.util.logging.config.file=${pkgs.nexus}/etc/karaf/java.util.logging.properties
|
-Djava.util.logging.config.file=${cfg.package}/etc/karaf/java.util.logging.properties
|
||||||
-Dkaraf.data=${cfg.home}/nexus3
|
-Dkaraf.data=${cfg.home}/nexus3
|
||||||
-Djava.io.tmpdir=${cfg.home}/nexus3/tmp
|
-Djava.io.tmpdir=${cfg.home}/nexus3/tmp
|
||||||
-Dkaraf.startLocalConsole=false
|
-Dkaraf.startLocalConsole=false
|
||||||
@ -112,7 +118,7 @@ in
|
|||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
|
|
||||||
script = "${pkgs.nexus}/bin/nexus run";
|
script = "${cfg.package}/bin/nexus run";
|
||||||
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
User = cfg.user;
|
User = cfg.user;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user