fork/home-manager
git clone https://git.julia.blue/fork/home-manager
a30f5b5b
master
1{ config , lib , pkgs , ...} : 2 3let 4 5cfg = config . programs . gh-dash ; 6 7yamlFormat = pkgs . formats . yaml { }; 8 9in { 10meta . maintainers = [ lib . maintainers . janik ]; 11 12options . programs . gh-dash = { 13enable = lib . mkEnableOption "GitHub CLI dashboard plugin" ; 14 15package = lib . mkPackageOption pkgs "gh-dash" { }; 16 17settings = lib . mkOption { 18type = yamlFormat . type ; 19default = { }; 20example = lib . literalExpression '' 21{ 22prSections = [{ 23title = "My Pull Requests"; 24filters = "is:open author:@me"; 25}]; 26} 27'' ; 28description = '' 29Configuration written to {file}`$XDG_CONFIG_HOME/gh-dash/config.yml`. 30'' ; 31}; 32}; 33 34config = lib . mkIf cfg . enable { 35home . packages = [ cfg . package ]; 36 37programs . gh . extensions = [ cfg . package ]; 38 39xdg . configFile . "gh-dash/config.yml" . source = 40yamlFormat . generate "gh-dash-config.yml" cfg . settings ; 41}; 42}