From e03c77cdbc97f7c68e049c19860cda1fe005e4f9 Mon Sep 17 00:00:00 2001 From: Hektor Misplon Date: Fri, 30 Jan 2026 15:41:04 +0100 Subject: [PATCH] feat: add CLI tools to git module --- home/hosts/andromache/default.nix | 3 ++- home/hosts/astyanax/default.nix | 3 ++- home/hosts/work/default.nix | 4 +++- home/modules/git.nix | 10 ---------- home/modules/git/default.nix | 26 ++++++++++++++++++++++++++ 5 files changed, 33 insertions(+), 13 deletions(-) delete mode 100644 home/modules/git.nix create mode 100644 home/modules/git/default.nix diff --git a/home/hosts/andromache/default.nix b/home/hosts/andromache/default.nix index 2b97ade..e7db362 100644 --- a/home/hosts/andromache/default.nix +++ b/home/hosts/andromache/default.nix @@ -14,7 +14,7 @@ in ../../modules/cloud ../../modules/desktop/niri ../../modules/3d - ../../modules/git.nix + ../../modules/git ../../modules/k9s.nix ../../modules/kitty.nix ../../modules/ssh.nix @@ -37,6 +37,7 @@ in browser.primary = "librewolf"; cloud.hetzner.enable = true; + github.enable = true; shell.bash = { enable = true; diff --git a/home/hosts/astyanax/default.nix b/home/hosts/astyanax/default.nix index ad0011e..a62490b 100644 --- a/home/hosts/astyanax/default.nix +++ b/home/hosts/astyanax/default.nix @@ -13,7 +13,7 @@ in ../../modules/anki.nix ../../modules/cloud ../../modules/desktop/niri - ../../modules/git.nix + ../../modules/git ../../modules/k9s.nix ../../modules/kitty.nix ../../modules/ssh.nix @@ -34,6 +34,7 @@ in browser.primary = "librewolf"; cloud.hetzner.enable = true; + github.enable = true; shell.bash = { enable = true; diff --git a/home/hosts/work/default.nix b/home/hosts/work/default.nix index f4108eb..47c37cb 100644 --- a/home/hosts/work/default.nix +++ b/home/hosts/work/default.nix @@ -14,7 +14,7 @@ in ../../modules/ai-tools.nix ../../modules/cloud ../../modules/dconf.nix - ../../modules/git.nix + ../../modules/git ../../modules/k9s.nix ../../modules/keepassxc.nix ../../modules/kitty.nix @@ -61,6 +61,8 @@ in browser.primary = "firefox"; browser.secondary = "chromium"; cloud.azure.enable = true; + github.enable = true; + gitlab.enable = true; shell.bash.enable = true; starship.enable = true; diff --git a/home/modules/git.nix b/home/modules/git.nix deleted file mode 100644 index b7013a7..0000000 --- a/home/modules/git.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ dotsPath, ... }: - -{ - programs.git.enable = true; - home.file = { - ".gitconfig".source = dotsPath + "/.gitconfig"; - ".gitconfig.work".source = dotsPath + "/.gitconfig.work"; - ".gitignore".source = dotsPath + "/.gitignore"; - }; -} diff --git a/home/modules/git/default.nix b/home/modules/git/default.nix new file mode 100644 index 0000000..3b097fd --- /dev/null +++ b/home/modules/git/default.nix @@ -0,0 +1,26 @@ +{ + config, + lib, + pkgs, + dotsPath, + ... +}: + +{ + options = { + github.enable = lib.mkEnableOption "Github CLI"; + gitlab.enable = lib.mkEnableOption "Gitlab CLI"; + }; + + config = { + programs.git.enable = true; + home.file = { + ".gitconfig".source = dotsPath + "/.gitconfig"; + ".gitconfig.work".source = dotsPath + "/.gitconfig.work"; + ".gitignore".source = dotsPath + "/.gitignore"; + }; + + programs.gh.enable = config.github.enable; + home.packages = with pkgs; lib.optionals (config.gitlab.enable) [ glab ]; + }; +}