fork/home-manager
git clone https://git.julia.blue/fork/home-manager
050d01a6
master
1{ config , lib , pkgs , ...} : 2 3with lib ; 4 5let 6 7cfg = config . programs . darcs ; 8 9in { 10meta . maintainers = with maintainers ; [ chris-martin ]; 11 12options = { 13programs . darcs = { 14enable = mkEnableOption "darcs" ; 15 16package = mkPackageOption pkgs "darcs" { }; 17 18author = mkOption { 19type = types . listOf types . str ; 20default = [ ]; 21example = [ "Fred Bloggs <fred@example.net>" ]; 22description = '' 23If this list has a single entry, it will be used as the author 24when you record a patch. If there are multiple entries, Darcs 25will prompt you to choose one of them. 26'' ; 27}; 28 29boring = mkOption { 30type = types . listOf types . str ; 31default = [ ]; 32example = [ "^.idea$" ".iml$" "^.stack-work$" ]; 33description = "File patterns to ignore" ; 34}; 35}; 36}; 37 38config = mkIf cfg . enable ( mkMerge [ 39{ home . packages = [ cfg . package ]; } 40 41( mkIf ( cfg . author != [ ]) { 42home . file . ".darcs/author" . text = 43concatMapStrings ( x :x + "\n" ) cfg . author ; 44}) 45 46( mkIf ( cfg . boring != [ ]) { 47home . file . ".darcs/boring" . text = 48concatMapStrings ( x :x + "\n" ) cfg . boring ; 49}) 50 51]); 52}