From 64d0ed66dce5b341da16f2e9987e56a8d3dfb879 Mon Sep 17 00:00:00 2001 From: kraanzu Date: Mon, 11 Nov 2024 08:07:57 +0530 Subject: [PATCH] feat: add hm-module --- flake.nix | 5 +++++ nix/hm-module.nix | 26 ++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 nix/hm-module.nix diff --git a/flake.nix b/flake.nix index ee11e86b..34888c2c 100644 --- a/flake.nix +++ b/flake.nix @@ -29,5 +29,10 @@ overlay = final: prev: { dooit = packageFor final.system; }; + + homeManagerModules = { + default = self.homeManagerModules.dooit; + dooit = import ./nix/hm-module.nix self; + }; }; } diff --git a/nix/hm-module.nix b/nix/hm-module.nix new file mode 100644 index 00000000..c58e85cd --- /dev/null +++ b/nix/hm-module.nix @@ -0,0 +1,26 @@ +{ + config, + lib, + pkgs, + ... +}: +with lib; let + dooitPackage = pkgs.callPackage ./default.nix {}; +in { + options.programs.dooit = { + enable = mkOption { + type = types.bool; + default = false; + description = "Enable the Dooit TUI todo manager."; + }; + extraPackages = mkOption { + type = types.listOf types.package; + default = []; + description = "Extra packages to include with Dooit."; + }; + }; + + config = mkIf config.programs.dooit.enable { + environment.systemPackages = [dooitPackage] ++ config.programs.dooit.extraPackages; + }; +}