diff --git a/hosts/pi4/actual.nix b/hosts/pi4/actual.nix index 9dda873..fbf0d50 100644 --- a/hosts/pi4/actual.nix +++ b/hosts/pi4/actual.nix @@ -1,24 +1,42 @@ { config, common, ... }: let - cfg = config.services.actual.settings; domain = "beta.budget.${common.domain}"; in { - services = { - actual = { - enable = true; - settings = { - port = 8084; - loginMethod = "password"; - }; - }; - nginx.virtualHosts.${domain} = { - forceSSL = true; - enableACME = true; - locations."/" = { - proxyPass = "http://localhost:${toString cfg.port}"; - proxyWebsockets = true; + networking.nat = { + enable = true; + internalInterfaces = [ "ve-*" ]; + externalInterface = "wlan0"; + # Lazy IPv6 connectivity for the container + enableIPv6 = true; + }; + + containers.actual = { + autoStart = true; + privateNetwork = true; + hostAddress = "192.168.10.188"; + localAddress = "192.168.10.11"; + config = + { ... }: + { + services = { + actual = { + enable = true; + settings = { + port = 8084; + loginMethod = "password"; + }; + }; + }; + system.stateVersion = common.system.version; }; + }; + services.nginx.virtualHosts.${domain} = { + forceSSL = true; + enableACME = true; + locations."/" = { + proxyPass = "http://${config.containers.actual.localAddress}:8084"; + proxyWebsockets = true; }; }; }