diff options
| author | Karan Jayachandra <karan.jayachandra@nxp.com> | 2026-07-17 15:27:54 +0200 |
|---|---|---|
| committer | Karan Jayachandra <karan.jayachandra@nxp.com> | 2026-07-17 15:27:54 +0200 |
| commit | 56586c5d5f75afafc630869a25811d4988a93f3a (patch) | |
| tree | 89a5dd6c10169b4096e6fc7b44c77457d66cdae3 /modules | |
| parent | 82778e3373b675c1b4bb0cefb4917d7abcc3410e (diff) | |
Added the actual fix
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/actual.nix | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/modules/actual.nix b/modules/actual.nix index ead1459..62593a1 100644 --- a/modules/actual.nix +++ b/modules/actual.nix @@ -2,30 +2,31 @@ # Actual Budget - local-first personal finance application. # -# Uses the NixOS native module (services.actual) available in nixpkgs 24.11+. +# Runs as a Podman OCI container because the native services.actual NixOS +# module is not available in nixos-24.11. The container listens on +# 127.0.0.1:5006; Caddy handles public HTTPS termination. +# # On first visit to https://budget.karanj.com the app prompts you to set a # server password in the browser - no pre-configuration needed. # -# All budget data is stored in /var/lib/actual (persists across reboots). +# All budget data is persisted in /var/lib/actual on the host. { - services.actual = { - enable = true; + # Ensure the data directory exists before the container starts + systemd.tmpfiles.rules = [ + "d /var/lib/actual 0750 root root -" + ]; + + virtualisation.oci-containers.containers.actual = { + image = "docker.io/actualbudget/actual-server:latest"; - settings = { - # Listen on localhost only; Caddy handles public HTTPS - hostname = "127.0.0.1"; - port = 5006; + ports = [ "127.0.0.1:5006:5006" ]; - # Tell Actual its public URL so HTTPS redirects work correctly - serverFiles = "/var/lib/actual/server-files"; - userFiles = "/var/lib/actual/user-files"; + volumes = [ + "/var/lib/actual:/data" + ]; + + environment = { + ACTUAL_PORT = "5006"; }; }; - - # Ensure data directory exists with correct ownership - systemd.tmpfiles.rules = [ - "d /var/lib/actual 0750 actual actual -" - "d /var/lib/actual/server-files 0750 actual actual -" - "d /var/lib/actual/user-files 0750 actual actual -" - ]; } |
