From ea86e52edcf435d1e658c3abce96c70dd9e1f442 Mon Sep 17 00:00:00 2001 From: stubbfelnewpc Date: Sat, 24 Oct 2020 19:09:39 +0200 Subject: [PATCH] add nexus , disable 7dtd --- services/7dtd.nix | 2 +- services/enabled.nix | 11 ++++++----- services/nexus.nix | 30 ++++++++++++++++++++++++++++++ 3 files changed, 37 insertions(+), 6 deletions(-) create mode 100644 services/nexus.nix diff --git a/services/7dtd.nix b/services/7dtd.nix index ad3615a..62f115f 100644 --- a/services/7dtd.nix +++ b/services/7dtd.nix @@ -31,7 +31,7 @@ in Type = "simple"; User = "sshuser"; Group = "users"; - WorkingDirectory = "/home/sshuser/SteamCMD7_Days_to_Die_server"; + WorkingDirectory = "/home/sshuser/SteamCMD7_Days_to_Die_server"; ExecStart = "${runEnv}/bin/7dtd-env"; Restart = "always"; }; diff --git a/services/enabled.nix b/services/enabled.nix index eb5003a..bb1965c 100644 --- a/services/enabled.nix +++ b/services/enabled.nix @@ -3,17 +3,18 @@ { imports = [ - ./7dtd.nix + #./7dtd.nix ./sshd.nix ./teamspeak.nix ./nginx.nix -# ./gitlab.nix + #./gitlab.nix ./nextcloud.nix ./news2kindle.nix ./resilio.nix ./sks.nix - ./gitea.nix -# ./wireguard.nix -# ./mqtt.nix + ./gitea.nix + ./nexus.nix + #./wireguard.nix + #./mqtt.nix ]; } diff --git a/services/nexus.nix b/services/nexus.nix new file mode 100644 index 0000000..c1c3a6f --- /dev/null +++ b/services/nexus.nix @@ -0,0 +1,30 @@ +{ config, pkgs, ...}: + +let + lAddress = "127.0.0.1"; + lPort = 9081; + nexusPkgs = pkgs.nexus.overrideAttrs (oldAttrs: rec { + pname = "nexus"; + version = "3.28.1-01"; + sourceRoot = "${pname}-${version}"; + src = pkgs.fetchurl { + url = "https://sonatype-download.global.ssl.fastly.net/nexus/3/nexus-${version}-unix.tar.gz"; + sha256 = "0qba2qaz85hf0vgix3qyqdl8yzdb6qr91sgdmxv3fgjhyvnvqyy8"; + }; +}); + +in +{ + services.nginx.virtualHosts."nexus.*" = { + enableACME = false; + forceSSL = false; + locations."/".proxyPass = "http://${lAddress}:${toString lPort}"; + }; + + services.nexus= { + enable = true; + listenAddress = lAddress; + listenPort = lPort; + package = nexusPkgs; + }; +}