aboutsummaryrefslogtreecommitdiff
path: root/modules/actual.nix
diff options
context:
space:
mode:
authorKaran Jayachandra <karan.jayachandra@nxp.com>2026-07-17 14:34:18 +0200
committerKaran Jayachandra <karan.jayachandra@nxp.com>2026-07-17 14:34:18 +0200
commit0d0788cd4ee378fba19e47a2c5d5527c196b65e0 (patch)
tree0fbd0e2644e94e0227005947004541fd4ff4d53e /modules/actual.nix
Initial commit
Diffstat (limited to 'modules/actual.nix')
-rw-r--r--modules/actual.nix31
1 files changed, 31 insertions, 0 deletions
diff --git a/modules/actual.nix b/modules/actual.nix
new file mode 100644
index 0000000..ead1459
--- /dev/null
+++ b/modules/actual.nix
@@ -0,0 +1,31 @@
+{ pkgs, ... }:
+
+# Actual Budget - local-first personal finance application.
+#
+# Uses the NixOS native module (services.actual) available in nixpkgs 24.11+.
+# 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).
+{
+ services.actual = {
+ enable = true;
+
+ settings = {
+ # Listen on localhost only; Caddy handles public HTTPS
+ hostname = "127.0.0.1";
+ port = 5006;
+
+ # Tell Actual its public URL so HTTPS redirects work correctly
+ serverFiles = "/var/lib/actual/server-files";
+ userFiles = "/var/lib/actual/user-files";
+ };
+ };
+
+ # 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 -"
+ ];
+}