From abce9344cb1d33b7751df3f5194216cd005a9a53 Mon Sep 17 00:00:00 2001 From: TheWanderingCrow Date: Mon, 22 Dec 2025 15:12:22 -0500 Subject: [PATCH] wip --- flake.nix | 17 +++++++++++++---- modules/actualbudget-report/default.nix | 4 +--- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/flake.nix b/flake.nix index 5caf0c0..f516c87 100644 --- a/flake.nix +++ b/flake.nix @@ -7,7 +7,11 @@ }; outputs = - inputs@{ flake-parts, ... }: + inputs@{ + self, + flake-parts, + ... + }: flake-parts.lib.mkFlake { inherit inputs; } { systems = [ "x86_64-linux" @@ -15,9 +19,14 @@ "aarch64-darwin" "x86_64-darwin" ]; - flake.nixosModules = { - default = ./modules/actualbudget-report; - }; + flake.nixosModules.default = + { lib, pkgs, ... }: + { + imports = [ ./modules/actualbudget-report ]; + options.services.actualbudget-report.package = lib.mkPackageOption pkgs "actualbudget-report" { + default = self.packages.${pkgs.stdenv.hostPlatform.system}.default; + }; + }; perSystem = { config, diff --git a/modules/actualbudget-report/default.nix b/modules/actualbudget-report/default.nix index d3e3763..6e6a118 100644 --- a/modules/actualbudget-report/default.nix +++ b/modules/actualbudget-report/default.nix @@ -11,7 +11,6 @@ let inherit (lib) mkEnableOption mkOption - mkPackageOption mkIf types ; @@ -20,8 +19,7 @@ in options = { services.actualbudget-report = { enable = mkEnableOption "Actualbudget email reports"; - package = mkPackageOption pkgs.default; - interval = { + interval = mkOption { type = types.str; default = "Sun 12:00:00"; description = "systemd-timer OnCalendar legal string for sending reports.";