this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

at master 79 lines 1.5 kB view raw
1{ 2 config, 3 lib, 4 pkgs, 5 ... 6}: 7let 8 toArg = k: v: "--${k}=${v}"; 9 listToArgs = k: vs: map (toArg k) vs; 10 attrsetToArgs = 11 attr: 12 lib.strings.concatStringsSep "\n" (lib.lists.flatten (lib.attrsets.mapAttrsToList listToArgs attr)); 13 cfg = config.programs.ctags; 14in 15{ 16 options.programs.ctags = { 17 enable = lib.mkEnableOption "ctags"; 18 19 package = lib.mkOption { 20 type = lib.types.package; 21 default = pkgs.universal-ctags; 22 defaultText = lib.literalExpression "pkgs.universal-ctags"; 23 description = "The <literal>ctags</literal> package to use."; 24 }; 25 26 flags = lib.mkOption { 27 type = lib.types.attrsOf lib.types.anything; 28 default = { }; 29 }; 30 }; 31 32 config = { 33 programs.ctags = { 34 enable = true; 35 36 flags = { 37 fields = [ 38 "+l" 39 "+n" 40 "+z" 41 "+Z" 42 ]; 43 44 exclude = [ 45 "_build" 46 "deps" 47 ".elixir_ls" 48 "mix.lock" 49 50 ".pijul" 51 "log" 52 "tmp" 53 ".direnv" 54 55 ".projections.json" 56 "coveralls.json" 57 58 "node_modules" 59 "project.json" 60 "package-lock.json" 61 "yarn.lock" 62 63 "target" 64 "Cargo.lock" 65 66 "flake.lock" 67 ]; 68 }; 69 }; 70 71 home.packages = [ cfg.package ]; 72 73 xdg.configFile.ctags = { 74 target = "ctags/config.ctags"; 75 76 text = attrsetToArgs cfg.flags; 77 }; 78 }; 79}