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 . pubs ; 8 9in { 10meta . maintainers = [ hm . maintainers . loicreynier ]; 11 12options . programs . pubs = { 13enable = mkEnableOption "pubs" ; 14 15package = mkOption { 16type = types . package ; 17default = pkgs . pubs ; 18defaultText = literalExpression "pkgs.pubs" ; 19description = "The package to use for the pubs script." ; 20}; 21 22extraConfig = mkOption { 23type = types . lines ; 24default = "" ; 25example = literalExpression '' 26''' 27[main] 28pubsdir = ''${config.home.homeDirectory}/.pubs 29docsdir = ''${config.home.homeDirectory}/.pubs/doc 30doc_add = link 31open_cmd = xdg-open 32 33[plugins] 34active = git,alias 35 36[[alias]] 37 38[[[la]]] 39command = list -a 40description = lists papers in lexicographic order 41 42[[git]] 43quiet = True 44manual = False 45force_color = False 46''''' ; 47description = '' 48Configuration using syntax written to 49{file}`$HOME/.pubsrc`. 50'' ; 51}; 52}; 53 54config = mkIf cfg . enable { 55home . packages = [ cfg . package ]; 56 57home . file . ".pubsrc" = 58mkIf ( cfg . extraConfig != "" ) { text = cfg . extraConfig ; }; 59}; 60}