From bb5c29107e355ce0db61197df03c8b2c67cb1c8f Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Tue, 24 Sep 2019 04:20:00 -0500 Subject: [PATCH] git: add attributes support --- modules/programs/git.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/modules/programs/git.nix b/modules/programs/git.nix index 370fcbb3..913f86f7 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"; + }; }; }