aboutsummaryrefslogtreecommitdiff
path: root/modules/actual.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/actual.nix')
-rw-r--r--modules/actual.nix32
1 files changed, 11 insertions, 21 deletions
diff --git a/modules/actual.nix b/modules/actual.nix
index 62593a1..95bbc7d 100644
--- a/modules/actual.nix
+++ b/modules/actual.nix
@@ -1,32 +1,22 @@
-{ pkgs, ... }:
+{ ... }:
# Actual Budget - local-first personal finance application.
#
-# 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.
+# Native NixOS module (services.actual, available since this flake's pinned
+# nixpkgs release). 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 persisted in /var/lib/actual on the host.
+# All budget data is persisted in /var/lib/actual on the host (the module's
+# own StateDirectory).
{
- # 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";
-
- ports = [ "127.0.0.1:5006:5006" ];
-
- volumes = [
- "/var/lib/actual:/data"
- ];
-
- environment = {
- ACTUAL_PORT = "5006";
+ services.actual = {
+ enable = true;
+ settings = {
+ hostname = "127.0.0.1";
+ port = 5006;
};
};
}