feat(actualbudget): add NixOS guest

This commit was merged in pull request #42.
This commit is contained in:
2026-08-11 08:36:02 -04:00
parent 55ed1bf5a9
commit 2d43a9853d
4 changed files with 155 additions and 4 deletions

50
guests/actualbudget.nix Normal file
View File

@@ -0,0 +1,50 @@
{
config,
lib,
my,
...
}:
let
cfg = config.guests.actualbudget;
dataDir = "/data";
in
{
imports = [
(my.guest {
name = "actualbudget";
interior = {
modules.services.actualbudget = {
enable = true;
inherit dataDir;
};
};
})
];
options.guests.actualbudget = {
dataPath = lib.mkOption {
type = lib.types.nullOr lib.types.str;
default = null;
example = "/srv/actualbudget";
description = "Host path bind-mounted as Actual Budget's data directory.";
};
};
config = lib.mkIf cfg.enable {
assertions = [
{
assertion = cfg.dataPath != null;
message = "guests.actualbudget.dataPath must point at the host directory that stores Actual Budget data.";
}
];
guests.actualbudget = {
mounts.${dataDir}.hostPath = cfg.dataPath;
limits = {
memory = lib.mkDefault "2G";
cpu = lib.mkDefault "200%";
tasksMax = lib.mkDefault 512;
};
};
};
}