NixOS and Home Manager config

feat(helix): minimal viable product zellij + helix + broot IDE like thing

nel.pet e15a22a1 865cad25

verified
+67
+1
modules/home/default.nix
··· 2 2 imports = [ 3 3 ./fonts.nix 4 4 ./git.nix 5 + ./helix/default.nix 5 6 ./i18n.nix 6 7 ./vscode.nix 7 8 ./ssh.nix
+52
modules/home/helix/default.nix
··· 1 + 2 + { lib, pkgs, wrappers, inputs, ... }: let 3 + helix = wrappers.helix { 4 + settings = { 5 + theme = "catppuccin_mocha"; 6 + }; 7 + }; 8 + # TODO: figure out something better than broot (probably self written). its close but not quite what i want and 9 + # configuring it is (evidently) a pain in the ass 10 + broot-opener = pkgs.writeShellApplication { 11 + name = "broot-zellij-hx-opener"; 12 + text = '' 13 + # Make sure we are focused on helix 14 + zellij action move-focus right 15 + zellij action move-focus up 16 + zellij action write 27 # escape 17 + zellij action write-chars ":open $1" 18 + zellij action write 13 # enter 19 + ''; 20 + }; 21 + broot-conf = pkgs.writeTextDir "brootconf/conf.toml" '' 22 + [[verbs]] 23 + invocation = "edit" 24 + key = "enter" 25 + shortcut = "e" 26 + external = [ "${lib.getExe pkgs.bash}", "-e", "${lib.getExe broot-opener}", "{file}" ] 27 + apply_to = "text_file" 28 + leave_broot = false 29 + ''; 30 + abaca-broot = inputs.wrappers.lib.wrapPackage { 31 + inherit pkgs; 32 + package = pkgs.broot; 33 + env = { 34 + BROOT_CONFIG_DIR = "${broot-conf}/brootconf"; 35 + }; 36 + }; 37 + abaca = pkgs.writeShellApplication { 38 + name = "abaca"; 39 + runtimeInputs = [ pkgs.zellij helix abaca-broot ]; 40 + text = '' 41 + exec ${lib.getExe pkgs.zellij} \ 42 + "--config" "${./zellij-config.kdl}" \ 43 + "--layout" "${./layout.kdl}" \ 44 + "$@" 45 + ''; 46 + }; 47 + in { 48 + home.packages = [ 49 + helix 50 + abaca 51 + ]; 52 + }
+13
modules/home/helix/layout.kdl
··· 1 + // Zellij layout for an IDE like interface around helix with terminal, treeview and helix itself 2 + layout { 3 + pane split_direction="vertical" { 4 + pane size=35 command="broot" 5 + pane split_direction="horizontal" { 6 + pane command="hx" 7 + pane size="25%" name="term" 8 + } 9 + } 10 + pane size=1 borderless=true { 11 + plugin location="status-bar" 12 + } 13 + }
+1
modules/home/helix/zellij-config.kdl
··· 1 + show_startup_tips false