# 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" ]; }; }; }