aboutsummaryrefslogtreecommitdiff
path: root/modules/programs/git.nix
diff options
context:
space:
mode:
authorMario Rodas <marsam@users.noreply.github.com>2019-09-24 04:20:00 -0500
committerMatthieu Coudron <coudron@iij.ad.jp>2019-09-26 22:11:01 +0900
commitbb5c29107e355ce0db61197df03c8b2c67cb1c8f (patch)
treecd85c7d78e5e306299c05037544612306e0fd0ef /modules/programs/git.nix
parent3f4563018010e2ad180d99d9cd876187e2905cee (diff)
git: add attributes support
Diffstat (limited to '')
-rw-r--r--modules/programs/git.nix11
1 files changed, 11 insertions, 0 deletions
diff --git a/modules/programs/git.nix b/modules/programs/git.nix
index 370fcbb3f77..913f86f71ce 100644
--- a/modules/programs/git.nix
+++ b/modules/programs/git.nix
@@ -179,6 +179,13 @@ in
description = "List of paths that should be globally ignored.";
};
+ attributes = mkOption {
+ type = types.listOf types.str;
+ default = [];
+ example = [ "*.pdf diff=pdf" ];
+ description = "List of defining attributes set globally.";
+ };
+
includes = mkOption {
type = types.listOf includeModule;
default = [];
@@ -226,6 +233,10 @@ in
"git/ignore" = mkIf (cfg.ignores != []) {
text = concatStringsSep "\n" cfg.ignores + "\n";
};
+
+ "git/attributes" = mkIf (cfg.attributes != []) {
+ text = concatStringsSep "\n" cfg.attributes + "\n";
+ };
};
}