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 . mr ; 8 9listToValue = concatMapStringsSep ", " ( generators . mkValueStringDefault { }); 10 11iniFormat = pkgs . formats . ini { inherit listToValue ; }; 12 13in { 14meta . maintainers = [ hm . maintainers . nilp0inter ]; 15 16options . programs . mr = { 17enable = mkEnableOption 18"mr, a tool to manage all your version control repositories" ; 19 20package = mkPackageOption pkgs "mr" { }; 21 22settings = mkOption { 23type = iniFormat . type ; 24default = { }; 25description = '' 26Configuration written to {file}`$HOME/.mrconfig` 27See <https://myrepos.branchable.com/> 28for an example configuration. 29'' ; 30example = literalExpression '' 31{ 32foo = { 33checkout = "git clone git@github.com:joeyh/foo.git"; 34update = "git pull --rebase"; 35}; 36".local/share/password-store" = { 37checkout = "git clone git@github.com:myuser/password-store.git"; 38}; 39} 40'' ; 41}; 42}; 43 44config = mkIf cfg . enable { 45home . packages = [ cfg . package ]; 46home . file . ".mrconfig" . source = iniFormat . generate ".mrconfig" cfg . settings ; 47}; 48} 49