[pi4] Containerize Actual service

This commit is contained in:
2025-06-23 19:18:40 +00:00
parent 763ee6312a
commit 3e718fadfc

View File

@ -1,9 +1,24 @@
{ config, common, ... }: { config, common, ... }:
let let
cfg = config.services.actual.settings;
domain = "beta.budget.${common.domain}"; domain = "beta.budget.${common.domain}";
in in
{ {
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 = { services = {
actual = { actual = {
enable = true; enable = true;
@ -12,13 +27,16 @@ in
loginMethod = "password"; loginMethod = "password";
}; };
}; };
nginx.virtualHosts.${domain} = { };
system.stateVersion = common.system.version;
};
};
services.nginx.virtualHosts.${domain} = {
forceSSL = true; forceSSL = true;
enableACME = true; enableACME = true;
locations."/" = { locations."/" = {
proxyPass = "http://localhost:${toString cfg.port}"; proxyPass = "http://${config.containers.actual.localAddress}:8084";
proxyWebsockets = true; proxyWebsockets = true;
}; };
}; };
};
} }