Skip to content

Commit

Permalink
feat: add hm-module
Browse files Browse the repository at this point in the history
  • Loading branch information
kraanzu committed Nov 11, 2024
1 parent ce798e4 commit 64d0ed6
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
5 changes: 5 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,10 @@
overlay = final: prev: {
dooit = packageFor final.system;
};

homeManagerModules = {
default = self.homeManagerModules.dooit;
dooit = import ./nix/hm-module.nix self;
};
};
}
26 changes: 26 additions & 0 deletions nix/hm-module.nix
Original file line number Diff line number Diff line change
@@ -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;
};
}

0 comments on commit 64d0ed6

Please sign in to comment.