nixos/goupile: change nginx hostname

Signed-off-by: phanirithvij <phanirithvij2000@gmail.com>
This commit is contained in:
phanirithvij
2026-05-18 10:35:10 +05:30
parent 0f42693c1d
commit c682df21f3
2 changed files with 4 additions and 4 deletions
+3 -2
View File
@@ -60,7 +60,8 @@ in
hostName = lib.mkOption {
type = lib.types.str;
default = "goupile";
default = config.networking.fqdnOrHostName;
defaultText = lib.literalExpression "config.networking.fqdnOrHostName";
description = "Nginx service name for goupile service.";
};
};
@@ -70,7 +71,7 @@ in
services.nginx = {
enable = lib.mkDefault true;
virtualHosts.${cfg.hostName} = {
locations."/".proxyPass = "http://${cfg.hostName}:${builtins.toString cfg.settings.HTTP.Port}";
locations."/".proxyPass = "http://127.0.0.1:${builtins.toString cfg.settings.HTTP.Port}";
};
};
}
+1 -2
View File
@@ -73,7 +73,6 @@ in
#systemd.services.goupile.environment.DEFAULT_SECCOMP_ACTION = "Log"; # Block|Log|Kill
networking = {
firewall.allowedTCPPorts = [ config.services.nginx.defaultHTTPListenPort ];
hostName = "goupile";
domain = "local";
};
@@ -108,7 +107,7 @@ in
machine.wait_for_open_port(${port})
machine.succeed("curl -q http://localhost:${port}")
machine.succeed("curl -q http://goupile.local")
machine.succeed("curl -q http://machine.local")
machine.succeed("curl -q http://localhost")
machine.succeed("run-goupile-test")