diff --git a/nixos/cache-server.nix b/nixos/cache-server.nix index d6300545..91045301 100644 --- a/nixos/cache-server.nix +++ b/nixos/cache-server.nix @@ -1,4 +1,4 @@ -{ config, makeEnable, lib, ... }: +{ config, lib, ... }: with lib; let cfg = config.modules.cache-server; in @@ -8,7 +8,7 @@ in enable = mkEnableOption "nix cache server"; port = mkOption { type = types.int; - default = 8080; + default = 5050; }; host-string = mkOption { type = types.string; @@ -27,18 +27,7 @@ in services.nix-serve = { enable = true; secretKeyFile = config.age.secrets."cache-priv-key.pem".path; - port = 5050; - }; - - 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; } ]; - }; - }; + port = cfg.port; }; }; } diff --git a/nixos/machines/biskcomp.nix b/nixos/machines/biskcomp.nix index 71e53715..678a74da 100644 --- a/nixos/machines/biskcomp.nix +++ b/nixos/machines/biskcomp.nix @@ -53,6 +53,13 @@ in proxyPass = "http://[::1]:8222"; }; }; + "cache.railbird.ai" = { + enableACME = true; + forceSSL = true; + locations."/" = { + proxyPass = "http://192.168.1.26:3090"; + }; + }; }; };