Files
nixos-configs/hosts/pinwheel/modules/git/default.nix
Alexander Heldt 408751cce5 pinwheel: Add enable option to git module
And use it to check when to add work `gitconfig`
2023-10-02 16:45:27 +02:00

24 lines
362 B
Nix

{ lib, config, ... }:
let
enabled = config.mod.git.enable;
in
{
options = {
mod.git = {
enable = lib.mkEnableOption "enable git module";
};
};
config = lib.mkIf enabled {
home-manager.users.alex = {
programs.git = {
enable = true;
includes = [
{ path = ./gitconfig; }
];
};
};
};
}