1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-16 16:19:44 +01:00

git: add option 'programs.git.ignores'

This allows the global Git ignores to be configured.
This commit is contained in:
Florian Klink 2017-11-12 13:28:12 +01:00 committed by Robert Helgesson
parent 04ea044917
commit c718951e97
No known key found for this signature in database
GPG key ID: C3DB11069E65DC86

View file

@ -76,6 +76,13 @@ in
type = types.attrsOf types.attrs; type = types.attrsOf types.attrs;
internal = true; internal = true;
}; };
ignores = mkOption {
type = types.listOf types.str;
default = [];
example = [ "*~" "*.swp" ];
description = "List of paths that should be globally ignored.";
};
}; };
}; };
@ -89,8 +96,13 @@ in
email = cfg.userEmail; email = cfg.userEmail;
}; };
xdg.configFile."git/config".text = xdg.configFile = {
generators.toINI {} cfg.iniContent; "git/config".text = generators.toINI {} cfg.iniContent;
"git/ignore" = mkIf (cfg.ignores != []) {
text = concatStringsSep "\n" cfg.ignores + "\n";
};
};
} }
(mkIf (cfg.signing != null) { (mkIf (cfg.signing != null) {