From afff3653c520123e0df0b63cf9fa0b8617aaebe0 Mon Sep 17 00:00:00 2001 From: Gabriel Arazas Date: Sun, 29 Dec 2024 11:46:16 +0800 Subject: [PATCH] users/foo-dogsquared/programs/hledger: init --- .../home-manager/foo-dogsquared/default.nix | 2 +- .../foo-dogsquared/modules/default.nix | 1 + .../modules/programs/hledger.nix | 19 +++++++++++++++++++ 3 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 configs/home-manager/foo-dogsquared/modules/programs/hledger.nix diff --git a/configs/home-manager/foo-dogsquared/default.nix b/configs/home-manager/foo-dogsquared/default.nix index fbd458b8..e494e1df 100644 --- a/configs/home-manager/foo-dogsquared/default.nix +++ b/configs/home-manager/foo-dogsquared/default.nix @@ -22,6 +22,7 @@ in email.enable = true; email.thunderbird.enable = true; vs-code.enable = true; + hledger.enable = true; custom-homepage = { enable = true; @@ -98,7 +99,6 @@ in home.packages = with pkgs; [ gopass # An improved version of the password manager for hipsters. - hledger # Trying to be a good accountant. ]; home.stateVersion = "23.11"; diff --git a/configs/home-manager/foo-dogsquared/modules/default.nix b/configs/home-manager/foo-dogsquared/modules/default.nix index d539f3be..3d19d8a7 100644 --- a/configs/home-manager/foo-dogsquared/modules/default.nix +++ b/configs/home-manager/foo-dogsquared/modules/default.nix @@ -9,6 +9,7 @@ ./programs/email.nix ./programs/git.nix ./programs/jujutsu.nix + ./programs/hledger.nix ./programs/keys.nix ./programs/nixvim ./programs/custom-homepage.nix diff --git a/configs/home-manager/foo-dogsquared/modules/programs/hledger.nix b/configs/home-manager/foo-dogsquared/modules/programs/hledger.nix new file mode 100644 index 00000000..ed43067c --- /dev/null +++ b/configs/home-manager/foo-dogsquared/modules/programs/hledger.nix @@ -0,0 +1,19 @@ +{ config, lib, pkgs, ... }: + +let + userCfg = config.users.foo-dogsquared; + cfg = userCfg.programs.hledger; +in +{ + options.users.foo-dogsquared.programs.hledger.enable = + lib.mkEnableOption "hledger setup"; + + config = lib.mkIf cfg.enable { + home.packages = with pkgs; [ + hledger + hledger-ui + hledger-web + hledger-utils + ]; + }; +}