Change host

searx vhost still not working
This commit is contained in:
muon 2024-12-01 10:22:10 +00:00
parent 784c5dfdad
commit 4b3808c042
6 changed files with 71 additions and 53 deletions

View file

@ -20,7 +20,7 @@ in with lib; {
default = "muon.host";
};
hosts = mkOption {
ports = mkOption {
type = types.attrsOf (types.ints.u16);
default = { };
};
@ -71,21 +71,18 @@ in with lib; {
proxy_pass_header Authorization;
'';
virtualHosts = let
base = locations: {
inherit locations;
# virtualHosts = let
# base = locations: {
# inherit locations;
forceSSL = true;
enableACME = true;
};
proxy = port:
base {
"/".proxyPass = cfg.ip + toString port + "/";
default = true;
};
in mapAttrs'
(name: port: nameValuePair ("${name}.${cfg.domain}") (proxy port))
cfg.hosts;
# forceSSL = true;
# enableACME = true;
# };
# proxy = port:
# base { "/".proxyPass = "http://${cfg.ip}:${toString port}/"; };
# in mapAttrs' (name: port:
# nameValuePair ("${name}.${cfg.domain}")
# (proxy port // { default = true; })) cfg.ports;
};
};
}