From a98a9b9048d06654d5a43abd19903dc7b56c5810 Mon Sep 17 00:00:00 2001 From: Jaculabilis Date: Sun, 27 Nov 2022 00:31:56 +0000 Subject: [PATCH] Re-bind fileserver to Nebula IP and re-enable --- configuration.nix | 2 +- fileserver.nix | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/configuration.nix b/configuration.nix index 020d566..b793248 100644 --- a/configuration.nix +++ b/configuration.nix @@ -3,7 +3,7 @@ { imports = [ ./hardware-configuration.nix - #./fileserver.nix + ./fileserver.nix ]; boot = { diff --git a/fileserver.nix b/fileserver.nix index 498c6d5..a25daf6 100644 --- a/fileserver.nix +++ b/fileserver.nix @@ -15,6 +15,9 @@ let # Define the service directory, which pretty much only stores tokens catacombServerDir = "/var/lib/nas-indexer/"; + # The address to bind to + bindAddr = "10.22.20.2"; + # Create a setup script to ensure the token directory exists catacombSetup = pkgs.writeShellScriptBin "catacomb-setup.sh" '' ${pkgs.coreutils}/bin/mkdir -p ${catacombServerDir}tokens @@ -115,7 +118,7 @@ in # Serve the host server over the internal ip at the default port virtualHosts."catacomb-host-server" = { - listen = [ { addr = "10.7.3.16"; } ]; + listen = [ { addr = bindAddr; } ]; root = "/nas"; locations."/".tryFiles = "\$uri @indexer"; locations."@indexer".proxyPass = "http://localhost:5000"; @@ -123,7 +126,7 @@ in # Serve the guest server over the internal ip at a custom port virtualHosts."catacomb-guest-server" = { - listen = [ { addr = "10.7.3.16"; port = 7472; } ]; + listen = [ { addr = bindAddr; port = 7472; } ]; extraConfig = '' access_log /var/log/nginx/access.guest-server.log; ''; @@ -132,7 +135,7 @@ in # Serve the auth server at a custom port internally virtualHosts."catacomb-auth" = { - listen = [ { addr = "10.7.3.16"; port = 7471; } ]; + listen = [ { addr = bindAddr; port = 7471; } ]; extraConfig = '' access_log /var/log/nginx/access.guest-auth.log; ''; @@ -141,7 +144,7 @@ in # Serve files at a custom port internally virtualHosts."catacomb-guest-files" = { - listen = [ { addr = "10.7.3.16"; port = 7470; } ]; + listen = [ { addr = bindAddr; port = 7470; } ]; extraConfig = '' access_log /var/log/nginx/access.guest-files.log; '';