[NixOS] Forward requests at cache.railbird.ai to ryzen-shine
This commit is contained in:
parent
8b07fdc391
commit
4ef82e4b02
@ -1,4 +1,4 @@
|
|||||||
{ config, makeEnable, lib, ... }:
|
{ config, lib, ... }:
|
||||||
with lib;
|
with lib;
|
||||||
let cfg = config.modules.cache-server;
|
let cfg = config.modules.cache-server;
|
||||||
in
|
in
|
||||||
@ -8,7 +8,7 @@ in
|
|||||||
enable = mkEnableOption "nix cache server";
|
enable = mkEnableOption "nix cache server";
|
||||||
port = mkOption {
|
port = mkOption {
|
||||||
type = types.int;
|
type = types.int;
|
||||||
default = 8080;
|
default = 5050;
|
||||||
};
|
};
|
||||||
host-string = mkOption {
|
host-string = mkOption {
|
||||||
type = types.string;
|
type = types.string;
|
||||||
@ -27,18 +27,7 @@ in
|
|||||||
services.nix-serve = {
|
services.nix-serve = {
|
||||||
enable = true;
|
enable = true;
|
||||||
secretKeyFile = config.age.secrets."cache-priv-key.pem".path;
|
secretKeyFile = config.age.secrets."cache-priv-key.pem".path;
|
||||||
port = 5050;
|
port = cfg.port;
|
||||||
};
|
|
||||||
|
|
||||||
services.nginx = {
|
|
||||||
enable = true;
|
|
||||||
recommendedProxySettings = true;
|
|
||||||
virtualHosts = {
|
|
||||||
"${cfg.host-string}" = {
|
|
||||||
locations."${cfg.path}".proxyPass = "http://${config.services.nix-serve.bindAddress}:${toString config.services.nix-serve.port}";
|
|
||||||
listen = [ { addr = "0.0.0.0"; port = cfg.port; } ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -53,6 +53,13 @@ in
|
|||||||
proxyPass = "http://[::1]:8222";
|
proxyPass = "http://[::1]:8222";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
"cache.railbird.ai" = {
|
||||||
|
enableACME = true;
|
||||||
|
forceSSL = true;
|
||||||
|
locations."/" = {
|
||||||
|
proxyPass = "http://192.168.1.26:3090";
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user