nixos/goupile: change nginx hostname
Signed-off-by: phanirithvij <phanirithvij2000@gmail.com>
This commit is contained in:
@@ -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}";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user