From 9cc1c2f644d5f48b83b542b7ca696aafefcc5d98 Mon Sep 17 00:00:00 2001 From: prescientmoon Date: Sat, 24 Feb 2024 02:15:56 +0100 Subject: [PATCH] Set up tmpfiles for actual --- hosts/nixos/lapetus/services/actual.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hosts/nixos/lapetus/services/actual.nix b/hosts/nixos/lapetus/services/actual.nix index 3f38fda..e316d65 100644 --- a/hosts/nixos/lapetus/services/actual.nix +++ b/hosts/nixos/lapetus/services/actual.nix @@ -2,18 +2,23 @@ let port = 8408; host = "actual.moonythm.dev"; + dataDir = "/persist/state/var/lib/actual"; in { imports = [ ../../common/optional/services/nginx.nix ]; + services.nginx.virtualHosts.${host} = config.satellite.proxy port { }; + # Ensure persistent directory exists + systemd.tmpfiles.rules = [ "d ${dataDir}" ]; + # {{{ General config virtualisation.oci-containers.containers.actual = { image = "actualbudget/actual-server:latest"; autoStart = true; ports = [ "${toString port}:5006" ]; # server:docker - volumes = [ "/persist/state/var/lib/actual:/data" ]; # server:docker + volumes = [ "${dataDir}:/data" ]; # server:docker environment = { }; };