git: add option to define store names for generated include files (#3171)
This allows to use gitconfig/gitconfig-some-intent as store path suffixes for the texts.
This commit is contained in:
parent
3d3bbdfe95
commit
5bb1f67568
3 changed files with 24 additions and 4 deletions
|
|
@ -130,10 +130,20 @@ let
|
|||
</citerefentry>.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config.path = mkIf (config.contents != { })
|
||||
(mkDefault (pkgs.writeText "contents" (gitToIni config.contents)));
|
||||
contentSuffix = mkOption {
|
||||
type = types.str;
|
||||
default = "gitconfig";
|
||||
description = ''
|
||||
Nix store name for the git configuration text file,
|
||||
when generating the configuration text from nix options.
|
||||
'';
|
||||
|
||||
};
|
||||
};
|
||||
config.path = mkIf (config.contents != { }) (mkDefault
|
||||
(pkgs.writeText (hm.strings.storeFileName config.contentSuffix)
|
||||
(gitToIni config.contents)));
|
||||
});
|
||||
|
||||
in {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue