this repo has no description
1
fork

Configure Feed

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

ddhx HM module

Ben C 7a87724d 63ff9dde

+71
+69
homeModules/ddhx.nix
··· 1 + {...}: { 2 + config, 3 + lib, 4 + pkgs, 5 + ... 6 + }: { 7 + options.cow.ddhx = { 8 + enable = lib.mkEnableOption "ddhx hex editor + customizations"; 9 + package = lib.mkPackageOption pkgs "ddhx" {}; 10 + 11 + # TODO: This is silly :P 12 + settings = lib.mkOption { 13 + type = lib.types.attrsOf lib.types.str; 14 + description = "Settings to place in config file. See CONFIGURATION section of ddhx.1 for docs"; 15 + default = { 16 + "mirror-cursor" = "on"; 17 + }; 18 + example = { 19 + "mirror-cursor" = "on"; 20 + "columns" = "auto"; 21 + }; 22 + }; 23 + 24 + colors = lib.mkOption { 25 + type = lib.types.attrsOf lib.types.str; 26 + description = "Set colors of different elements"; 27 + default = { 28 + "cursor" = "green:black"; 29 + "mirror" = "red:black"; 30 + "selection" = "black:blue"; 31 + "zero" = "gray"; 32 + }; 33 + example = { 34 + cursor = "blue:white"; 35 + }; 36 + }; 37 + 38 + binds = lib.mkOption { 39 + type = lib.types.attrsOf lib.types.str; 40 + description = "Set keybinds"; 41 + default = { 42 + ":" = "menu"; 43 + "i" = "change-mode"; 44 + }; 45 + }; 46 + }; 47 + 48 + config = lib.mkIf config.cow.ddhx.enable { 49 + home.packages = [ 50 + config.cow.ddhx.package 51 + ]; 52 + 53 + xdg.configFile."ddhx/.ddhxrc".text = let 54 + inherit (config.cow.ddhx) settings colors binds; 55 + mkEntries = word: 56 + lib.mapAttrsToList (k: v: 57 + ( 58 + if word != null 59 + then word + " " 60 + else "" 61 + ) 62 + + k 63 + + " " 64 + + v); 65 + entries = (mkEntries null settings) ++ (mkEntries "color" colors) ++ (mkEntries "bind" binds); 66 + in 67 + lib.concatLines entries; 68 + }; 69 + }
+2
homeModules/utils.nix
··· 18 18 }; 19 19 20 20 config = lib.mkIf config.cow.utils.enable { 21 + cow.ddhx.enable = true; 22 + 21 23 home.packages = with pkgs; 22 24 [ 23 25 ripgrep