add nh, a nix cli helper tool
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
./gpg
|
||||
./git
|
||||
./xdg
|
||||
./nh
|
||||
];
|
||||
|
||||
dots = {
|
||||
@@ -24,6 +25,7 @@
|
||||
gpg.enable = lib.mkDefault true;
|
||||
git.enable = lib.mkDefault true;
|
||||
xdg.enable = lib.mkDefault true;
|
||||
nh.enable = lib.mkDefault true;
|
||||
};
|
||||
|
||||
|
||||
|
||||
21
users/blake/dots/core/nh/default.nix
Normal file
21
users/blake/dots/core/nh/default.nix
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
program = "nh";
|
||||
cfg = config.dots.${program};
|
||||
home_dir = config.home.homeDirectory;
|
||||
in {
|
||||
options.dots.${program} = {
|
||||
enable = lib.mkEnableOption "enables ${program}";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.${program} = {
|
||||
enable = true;
|
||||
flake = "${home_dir}/.nix/flake.nix";
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user