Skip to content

Commit

Permalink
feat(nix): add gh module
Browse files Browse the repository at this point in the history
  • Loading branch information
sbulav committed Feb 15, 2024
1 parent d2faf5a commit b501863
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
1 change: 1 addition & 0 deletions nix/modules/nixos/suites/common/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ in {

custom.tools = {
git.enable = true;
gh.enable = true;
http.enable = true;
misc.enable = true;
net.enable = true;
Expand Down
23 changes: 23 additions & 0 deletions nix/modules/nixos/tools/gh/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
options,
config,
pkgs,
lib,
...
}:
with lib;
with lib.custom; let
cfg = config.custom.tools.gh;
in {
options.custom.tools.gh = with types; {
enable = mkBoolOpt false "Whether or not to install and configure gh.";
};

config = mkIf cfg.enable {
home.extraOptions = {
programs.gh = {
enable = true;
};
};
};
}

0 comments on commit b501863

Please sign in to comment.