From 9be9ad7675f4dff00d681fa5e4fe22f52edde99e Mon Sep 17 00:00:00 2001 From: alexion Date: Mon, 12 Oct 2026 11:40:05 -0400 Subject: [PATCH] refactor(actualbudget): remove unused service --- configs/nixos/guests/actualbudget.nix | 51 --------------- configs/nixos/hosts/pikachu/default.nix | 16 ----- .../nixos/modules/services/actualbudget.nix | 62 ------------------- 3 files changed, 129 deletions(-) delete mode 100644 configs/nixos/guests/actualbudget.nix delete mode 100644 configs/nixos/modules/services/actualbudget.nix diff --git a/configs/nixos/guests/actualbudget.nix b/configs/nixos/guests/actualbudget.nix deleted file mode 100644 index 5bd3157..0000000 --- a/configs/nixos/guests/actualbudget.nix +++ /dev/null @@ -1,51 +0,0 @@ -{ - config, - lib, - ... -}: -let - cfg = config.guests.actualbudget; # NOLINT(let_order) - dataDir = "/data"; -in -{ - 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."; - } - ]; - - registry.homepage.${config.networking.hostName}.actualbudget = { - tab = "Apps"; - section = "Other"; - name = "Actual Budget"; - description = "Finance"; - icon = "actual-budget.png"; - }; - - guests.actualbudget = { - interior = { - modules.services.actualbudget = { - enable = true; - inherit dataDir; - }; - }; - mounts.${dataDir}.directory = cfg.dataPath; - limits = { - memory = lib.mkDefault "2G"; - cpu = lib.mkDefault "200%"; - tasksMax = lib.mkDefault 512; - }; - }; - }; -} diff --git a/configs/nixos/hosts/pikachu/default.nix b/configs/nixos/hosts/pikachu/default.nix index 939008d..62c0be8 100644 --- a/configs/nixos/hosts/pikachu/default.nix +++ b/configs/nixos/hosts/pikachu/default.nix @@ -71,22 +71,6 @@ }; }; - guests.actualbudget = { - enable = true; - vlan = 20; - mac = "BC:24:11:C1:CD:28"; - dataPath = "/pikachu/data/actualbudget"; - address = "10.23.20.42"; - reverseProxy = { - enable = true; - route = { - domain = "budget.alexion.dev"; - protocol = "https"; - port = 5006; - }; - }; - }; - guests.navidrome = { enable = true; vlan = 20; diff --git a/configs/nixos/modules/services/actualbudget.nix b/configs/nixos/modules/services/actualbudget.nix deleted file mode 100644 index eaddda6..0000000 --- a/configs/nixos/modules/services/actualbudget.nix +++ /dev/null @@ -1,62 +0,0 @@ -{ - config, - lib, - ... -}: -let - cfg = config.modules.services.actualbudget; # NOLINT(let_order) -in -{ - options.modules.services.actualbudget = { - enable = lib.mkEnableOption "Actual Budget"; - - port = lib.mkOption { - type = lib.types.port; - default = 5006; - description = "Port Actual Budget listens on."; - }; - - dataDir = lib.mkOption { - type = lib.types.str; - default = "/data"; - description = "Directory where Actual Budget stores server and user files."; - }; - - user = lib.mkOption { - type = lib.types.str; - default = "actual"; - description = "User account that runs Actual Budget."; - }; - - group = lib.mkOption { - type = lib.types.str; - default = "storage"; - description = "Group account that owns Actual Budget's writable state."; - }; - - }; - - config = lib.mkMerge [ - { - registry."stable-uid".${config.networking.hostName}.actualbudget = 20001; - } - - (lib.mkIf cfg.enable { - users.users.${cfg.user} = { - isSystemUser = true; - uid = config.registry."stable-uid".${config.networking.hostName}.actualbudget; - inherit (cfg) group; - }; - - services.actual = { - enable = true; - openFirewall = true; - inherit (cfg) user; - inherit (cfg) group; - settings = { - inherit (cfg) port dataDir; - }; - }; - }) - ]; -}