fork/home-manager
git clone https://git.julia.blue/fork/home-manager
75790441
master
1{ config , lib , pkgs , ...} : 2 3with lib ; 4 5let 6 7cfg = config . programs . git-cliff ; 8tomlFormat = pkgs . formats . toml { }; 9 10in { 11meta . maintainers = [ hm . maintainers . NateCox ]; 12 13options . programs . git-cliff = { 14enable = mkEnableOption "git-cliff changelog generator" ; 15 16package = mkPackageOption pkgs "git-cliff" { }; 17 18settings = mkOption { 19type = tomlFormat . type ; 20default = { }; 21example = literalExpression '' 22{ 23header = "Changelog"; 24trim = true; 25} 26'' ; 27description = '' 28Configuration written to 29{file}`$XDG_CONFIG_HOME/git-cliff/cliff.toml`. See 30<https://git-cliff.org/docs/configuration> 31for the documentation. 32'' ; 33}; 34}; 35 36config = mkIf cfg . enable { 37home . packages = [ cfg . package ]; 38 39xdg . configFile = { 40"git-cliff/cliff.toml" = mkIf ( cfg . settings != { }) { 41source = tomlFormat . generate "git-cliff-config" cfg . settings ; 42}; 43}; 44}; 45}