nix/modules/stuff/git.nix

29 lines
719 B
Nix
Raw Normal View History

2024-08-01 21:22:47 +02:00
{ lib, pkgs, config, ...}: let
inherit (lib) mkIf mkEnableOption mkOption;
cfg = config.chuj.stuff.git;
user = config.chuj.system.user;
in {
options.chuj.stuff.git = {
enable = mkEnableOption "git";
};
2024-08-10 01:03:29 +02:00
config = mkIf cfg.enable {
2024-10-16 11:40:24 +02:00
environment.systemPackages = [ pkgs.git pkgs.codeberg-cli ];
2024-08-01 21:22:47 +02:00
home-manager.users.${user}.programs.git = {
enable = true;
2024-10-16 16:08:40 +02:00
# should this be here??????
2024-08-01 21:22:47 +02:00
userName = "krizej";
userEmail = "krizej@protonmail.com";
extraConfig.init.defaultBranch = "master";
2024-08-02 00:14:06 +02:00
ignores = [
2024-10-16 16:08:40 +02:00
".direnv/"
2024-08-02 00:14:06 +02:00
".idea/"
"build/"
".venv/"
2024-11-13 17:05:36 +01:00
".cache/"
"compile_commands.json"
2024-08-02 00:14:06 +02:00
"**/__pycache__/"
];
2024-08-01 21:22:47 +02:00
};
};
2024-11-13 17:05:36 +01:00
}