Files
nixos/modules/environments/actual/default.nix
T
2026-04-20 16:34:27 +02:00

48 lines
846 B
Nix

# manages and downloads films
{
config,
lib,
pkgs,
...
}:
let
cfg = config.my.profiles.actual;
hostName = config.networking.hostName;
port = 40465;
in
{
options.my.profiles.actual = with lib; {
enable = mkEnableOption "Actual budget service";
};
config = lib.mkIf cfg.enable {
services.actual = {
enable = true;
openFirewall = true;
settings = {
port = port;
hostname = "0.0.0.0";
};
};
environment.systemPackages = with pkgs; [
actual-server
];
my.homepage.services = [
{
group = "Finance";
name = "Actual";
description = "Budgeting";
href = "http://${hostName}:${toString port}";
icon = "mdi-cash";
}
];
systemd.services.actual = {
after = [ "network-online.target" ];
};
};
}