1
1
Fork 0

Re-bind fileserver to Nebula IP and re-enable

This commit is contained in:
Jaculabilis 2022-11-27 00:31:56 +00:00
parent fb87cb5dbd
commit a98a9b9048
2 changed files with 8 additions and 5 deletions

View File

@ -3,7 +3,7 @@
{ {
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
#./fileserver.nix ./fileserver.nix
]; ];
boot = { boot = {

View File

@ -15,6 +15,9 @@ let
# Define the service directory, which pretty much only stores tokens # Define the service directory, which pretty much only stores tokens
catacombServerDir = "/var/lib/nas-indexer/"; 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 # Create a setup script to ensure the token directory exists
catacombSetup = pkgs.writeShellScriptBin "catacomb-setup.sh" '' catacombSetup = pkgs.writeShellScriptBin "catacomb-setup.sh" ''
${pkgs.coreutils}/bin/mkdir -p ${catacombServerDir}tokens ${pkgs.coreutils}/bin/mkdir -p ${catacombServerDir}tokens
@ -115,7 +118,7 @@ in
# Serve the host server over the internal ip at the default port # Serve the host server over the internal ip at the default port
virtualHosts."catacomb-host-server" = { virtualHosts."catacomb-host-server" = {
listen = [ { addr = "10.7.3.16"; } ]; listen = [ { addr = bindAddr; } ];
root = "/nas"; root = "/nas";
locations."/".tryFiles = "\$uri @indexer"; locations."/".tryFiles = "\$uri @indexer";
locations."@indexer".proxyPass = "http://localhost:5000"; locations."@indexer".proxyPass = "http://localhost:5000";
@ -123,7 +126,7 @@ in
# Serve the guest server over the internal ip at a custom port # Serve the guest server over the internal ip at a custom port
virtualHosts."catacomb-guest-server" = { virtualHosts."catacomb-guest-server" = {
listen = [ { addr = "10.7.3.16"; port = 7472; } ]; listen = [ { addr = bindAddr; port = 7472; } ];
extraConfig = '' extraConfig = ''
access_log /var/log/nginx/access.guest-server.log; access_log /var/log/nginx/access.guest-server.log;
''; '';
@ -132,7 +135,7 @@ in
# Serve the auth server at a custom port internally # Serve the auth server at a custom port internally
virtualHosts."catacomb-auth" = { virtualHosts."catacomb-auth" = {
listen = [ { addr = "10.7.3.16"; port = 7471; } ]; listen = [ { addr = bindAddr; port = 7471; } ];
extraConfig = '' extraConfig = ''
access_log /var/log/nginx/access.guest-auth.log; access_log /var/log/nginx/access.guest-auth.log;
''; '';
@ -141,7 +144,7 @@ in
# Serve files at a custom port internally # Serve files at a custom port internally
virtualHosts."catacomb-guest-files" = { virtualHosts."catacomb-guest-files" = {
listen = [ { addr = "10.7.3.16"; port = 7470; } ]; listen = [ { addr = bindAddr; port = 7470; } ];
extraConfig = '' extraConfig = ''
access_log /var/log/nginx/access.guest-files.log; access_log /var/log/nginx/access.guest-files.log;
''; '';