diff --git a/flake.lock b/flake.lock index 4192931..020ecd4 100644 --- a/flake.lock +++ b/flake.lock @@ -156,6 +156,28 @@ "type": "github" } }, + "crane": { + "inputs": { + "nixpkgs": [ + "schizofox", + "searx-randomizer", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1701386725, + "narHash": "sha256-w4aBlMYh9Y8co1V80m5LzEKMijUJ7CBTq209WbqVwUU=", + "owner": "ipetkov", + "repo": "crane", + "rev": "8b9bad9b30bd7a9ed08782e64846b7485f9d0a38", + "type": "github" + }, + "original": { + "owner": "ipetkov", + "repo": "crane", + "type": "github" + } + }, "darwin": { "inputs": { "nixpkgs": [ @@ -178,22 +200,6 @@ "type": "github" } }, - "doomemacs": { - "flake": false, - "locked": { - "lastModified": 1713464448, - "narHash": "sha256-Fhir4WlcfEh70V8+oNS1LVAGBftiqtD2qaHzOC8BJUI=", - "owner": "doomemacs", - "repo": "doomemacs", - "rev": "9620bb45ac4cd7b0274c497b2d9d93c4ad9364ee", - "type": "github" - }, - "original": { - "owner": "doomemacs", - "repo": "doomemacs", - "type": "github" - } - }, "fenix": { "inputs": { "nixpkgs": [ @@ -247,6 +253,22 @@ } }, "flake-compat_3": { + "flake": false, + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-compat_4": { "flake": false, "locked": { "lastModified": 1673956053, @@ -262,7 +284,7 @@ "type": "github" } }, - "flake-compat_4": { + "flake-compat_5": { "flake": false, "locked": { "lastModified": 1696426674, @@ -342,6 +364,27 @@ } }, "flake-parts_4": { + "inputs": { + "nixpkgs-lib": [ + "nixpak", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1714641030, + "narHash": "sha256-yzcRNDoyVP7+SCNX0wmuDju1NUCt8Dz9+lyUXEI0dbI=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "e5d10a24b66c3ea8f150e47dfdb0416ab7c3390e", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_5": { "inputs": { "nixpkgs-lib": [ "nixpkgs-wayland", @@ -363,6 +406,45 @@ "type": "github" } }, + "flake-parts_6": { + "inputs": { + "nixpkgs-lib": [ + "schizofox", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1712014858, + "narHash": "sha256-sB4SWl2lX95bExY2gMFG5HIzvva5AVMJd4Igm+GpZNw=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "9126214d0a59633752a136528f5f3b9aa8565b7d", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_7": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib_2" + }, + "locked": { + "lastModified": 1698882062, + "narHash": "sha256-HkhafUayIqxXyHH1X8d9RDl1M2CkFgZLjKD3MzabiEo=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "8c9fa2545007b49a5db5f650ae91f227672c3877", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, "flake-utils": { "inputs": { "systems": "systems_3" @@ -401,7 +483,7 @@ }, "flake-utils_3": { "inputs": { - "systems": "systems_5" + "systems": "systems_6" }, "locked": { "lastModified": 1685518550, @@ -472,6 +554,31 @@ "type": "github" } }, + "hercules-ci-effects_2": { + "inputs": { + "flake-parts": [ + "nixpak", + "flake-parts" + ], + "nixpkgs": [ + "nixpak", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1713898448, + "narHash": "sha256-6q6ojsp/Z9P2goqnxyfCSzFOD92T3Uobmj8oVAicUOs=", + "owner": "hercules-ci", + "repo": "hercules-ci-effects", + "rev": "c0302ec12d569532a6b6bd218f698bc402e93adc", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "hercules-ci-effects", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -514,6 +621,27 @@ } }, "home-manager_3": { + "inputs": { + "nixpkgs": [ + "schizofox", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1712759992, + "narHash": "sha256-2APpO3ZW4idlgtlb8hB04u/rmIcKA8O7pYqxF66xbNY=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "31357486b0ef6f4e161e002b6893eeb4fafc3ca9", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, + "home-manager_4": { "inputs": { "nixpkgs": [ "stylix", @@ -757,7 +885,7 @@ }, "nix-eval-jobs": { "inputs": { - "flake-parts": "flake-parts_4", + "flake-parts": "flake-parts_5", "nix-github-actions": "nix-github-actions", "nixpkgs": "nixpkgs_5", "treefmt-nix": "treefmt-nix" @@ -813,6 +941,28 @@ "type": "github" } }, + "nixpak": { + "inputs": { + "flake-parts": "flake-parts_4", + "hercules-ci-effects": "hercules-ci-effects_2", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1715221459, + "narHash": "sha256-3Pkhm05eSJHoSGboy96/OvEi58nTvOlSqsAJSxgtANg=", + "owner": "nixpak", + "repo": "nixpak", + "rev": "1fe58a4f64dbd4243f12195971c9e85c411fe2eb", + "type": "github" + }, + "original": { + "owner": "nixpak", + "repo": "nixpak", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1703013332, @@ -844,6 +994,24 @@ "type": "github" } }, + "nixpkgs-lib_2": { + "locked": { + "dir": "lib", + "lastModified": 1698611440, + "narHash": "sha256-jPjHjrerhYDy3q9+s5EAsuhyhuknNfowY6yt6pjn9pc=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "0cbe9f69c234a7700596e943bfae7ef27a31b735", + "type": "github" + }, + "original": { + "dir": "lib", + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs-wayland": { "inputs": { "flake-compat": "flake-compat_2", @@ -1012,15 +1180,16 @@ "inputs": { "agenix": "agenix", "anyrun": "anyrun", - "doomemacs": "doomemacs", "fenix": "fenix", "home-manager": "home-manager_2", "hyprland": "hyprland", "hyprland-plugins": "hyprland-plugins", "neovim-nightly-overlay": "neovim-nightly-overlay", + "nixpak": "nixpak", "nixpkgs": "nixpkgs_4", "nixpkgs-wayland": "nixpkgs-wayland", "nur": "nur", + "schizofox": "schizofox", "spicetify-nix": "spicetify-nix", "split-monitor-workspaces": "split-monitor-workspaces", "stylix": "stylix", @@ -1044,6 +1213,57 @@ "type": "github" } }, + "schizofox": { + "inputs": { + "flake-compat": "flake-compat_3", + "flake-parts": "flake-parts_6", + "home-manager": "home-manager_3", + "nixpak": [ + "nixpak" + ], + "nixpkgs": [ + "nixpkgs" + ], + "searx-randomizer": "searx-randomizer", + "systems": "systems_5" + }, + "locked": { + "lastModified": 1714677453, + "narHash": "sha256-MlkAYTZz5/bFJgNIewbJa8mbtoVqg6Pq7t8A5Z1wVvc=", + "owner": "schizofox", + "repo": "schizofox", + "rev": "9c7263441064d0e3e4c94e1d8dbd8d260d00408d", + "type": "github" + }, + "original": { + "owner": "schizofox", + "repo": "schizofox", + "type": "github" + } + }, + "searx-randomizer": { + "inputs": { + "crane": "crane", + "flake-parts": "flake-parts_7", + "nixpkgs": [ + "schizofox", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1704412376, + "narHash": "sha256-Ap/AudJxCYBDWYy0lyqP0/FZYJCibL7jKkoj6hp1WS0=", + "owner": "schizofox", + "repo": "searx-randomizer", + "rev": "c36a473732ba6b4f6024ac1c181631cf4d542b17", + "type": "github" + }, + "original": { + "owner": "schizofox", + "repo": "searx-randomizer", + "type": "github" + } + }, "spicetify-nix": { "inputs": { "flake-utils": "flake-utils_3", @@ -1093,9 +1313,9 @@ "base16-kitty": "base16-kitty", "base16-tmux": "base16-tmux", "base16-vim": "base16-vim", - "flake-compat": "flake-compat_3", + "flake-compat": "flake-compat_4", "gnome-shell": "gnome-shell", - "home-manager": "home-manager_3", + "home-manager": "home-manager_4", "nixpkgs": "nixpkgs_8" }, "locked": { @@ -1173,6 +1393,21 @@ } }, "systems_5": { + "locked": { + "lastModified": 1689347949, + "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", + "owner": "nix-systems", + "repo": "default-linux", + "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default-linux", + "type": "github" + } + }, + "systems_6": { "locked": { "lastModified": 1681028828, "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", @@ -1211,7 +1446,7 @@ }, "waybar": { "inputs": { - "flake-compat": "flake-compat_4", + "flake-compat": "flake-compat_5", "nixpkgs": "nixpkgs_9" }, "locked": { diff --git a/flake.nix b/flake.nix index 7ffe388..f0f9528 100644 --- a/flake.nix +++ b/flake.nix @@ -13,11 +13,12 @@ url = "github:hyprwm/hyprland-plugins"; inputs.hyprland.follows = "hyprland"; }; - doomemacs = { - url = "github:doomemacs/doomemacs"; - flake = false; + nixpak = { + url = "github:nixpak/nixpak"; + inputs.nixpkgs.follows = "nixpkgs"; }; nixpkgs-wayland.url = "github:nix-community/nixpkgs-wayland"; + split-monitor-workspaces = { url = "github:Duckonaut/split-monitor-workspaces"; inputs.hyprland.follows = "hyprland"; @@ -31,6 +32,13 @@ url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; + schizofox = { + url = "github:schizofox/schizofox"; + inputs = { + nixpkgs.follows = "nixpkgs"; + nixpak.follows = "nixpak"; + }; + }; spicetify-nix.url = "github:the-argus/spicetify-nix"; nur = { url = "github:nix-community/NUR"; diff --git a/hosts/vali/mars/configuration.nix b/hosts/vali/mars/configuration.nix index cc5d28f..57cf6f0 100644 --- a/hosts/vali/mars/configuration.nix +++ b/hosts/vali/mars/configuration.nix @@ -43,10 +43,12 @@ # awesome.enable = true; hyprland.enable = true; newsboat.enable = true; - emacs.enable = true; +# emacs.enable = true; fish.enable = true; stylix.enable = true; + helix.enable = true; nh.enable = true; + schizofox.enable = true; # spicetify.enable = true; anyrun.enable = true; }; diff --git a/hosts/vali/mars/hyprland/hyprland.nix b/hosts/vali/mars/hyprland/hyprland.nix index 2c0bd6e..9d51e9c 100644 --- a/hosts/vali/mars/hyprland/hyprland.nix +++ b/hosts/vali/mars/hyprland/hyprland.nix @@ -45,7 +45,7 @@ in { xwayland.enable = true; systemd = { enable = true; - variables = ["--all"]; + variables = [ "--all" ]; }; settings = { "$mainMod" = "SUPER"; @@ -97,6 +97,7 @@ in { "special:nixos, decorate:false" "special:keepassxc, decorate:false" ]; + input = { kb_layout = "de"; kb_variant = ""; @@ -120,6 +121,7 @@ in { #"col.active_border" = "0xFFF5C2E7"; #"col.inactive_border" = "0xFF45475A"; }; + decoration = { rounding = 0; blur = { @@ -138,16 +140,13 @@ in { #"col.shadow" = "0xAF1E1E2E"; }; - /*cursor = { - default_monitor ="HDMI-A-2"; - enable_hyprcursor = true; - hide_on_key_press = true; - };*/ + bezier = [ "dupa, 0.1, 0.9, 0.1, 1.05" "apf,0.76,0,0.24,1" "fast,0.34,1.56,0.64,1" ]; + animations = { enabled = true; animation = [ @@ -158,12 +157,15 @@ in { "workspaces, 1, 5, dupa, slidevert" ]; }; + dwindle = { no_gaps_when_only = true; }; + debug = { disable_logs =false; }; + misc = { enable_swallow = true; swallow_regex = "kitty"; @@ -174,6 +176,7 @@ in { animate_mouse_windowdragging = false; force_default_wallpaper = 0; }; + windowrulev2 = [ "float, class:^(Tor Browser)$" "float, class:^(mpv)$" @@ -224,6 +227,7 @@ in { "$mainMod, X, togglespecialworkspace, keepassxc" "$mainMod CONTROL, B, exec, ${pkgs.procps}/bin/pkill waybar || ${waybar}/bin/waybar" ]; + binde = [ # window focus "$mainMod, H, movefocus, l" @@ -253,10 +257,9 @@ in { volume_up = "${pkgs.pamixer}/bin/pamixer -ui 5"; volume_down = "${pkgs.pamixer}/bin/pamixer -ud 5"; in [ - ", XF86AudioRaiseVolume, exec, ${volume_up}" - ", XF86AudioLowerVolume, exec, ${volume_down}" + ", XF86AudioRaiseVolume, exec, ${volume_up}" + ", XF86AudioLowerVolume, exec, ${volume_down}" ]; - bindm = [ "$mainMod, mouse:272, movewindow" "$mainMod, mouse:273, resizewindow" @@ -270,7 +273,7 @@ in { "${waybar}/bin/waybar" # run persistent special workspace windows - "[workspace special:nixos silent;tile] ${pkgs.kitty}/bin/kitty -d ~/repos/nichts -e nvim" + "[workspace special:nixos silent;tile] ${pkgs.kitty}/bin/kitty -d ~/repos/nichts -e hx" "[workspace special:keepassxc silent;tile] ${pkgs.keepassxc}/bin/keepassxc" "${swww}/bin/swww-daemon" diff --git a/modules/cli/fish.nix b/modules/cli/fish.nix index 8c5ae32..09630a8 100644 --- a/modules/cli/fish.nix +++ b/modules/cli/fish.nix @@ -54,6 +54,7 @@ in { lg = "lazygit"; cd = "z"; v = "nvim"; + h = "hx"; e = "emacs"; update = "sudo nixos-rebuild switch --flake \"${gitPath}#${hostname}\""; flake = "cd '${gitPath}'"; diff --git a/modules/gui/default.nix b/modules/gui/default.nix index 583cb04..00792f5 100644 --- a/modules/gui/default.nix +++ b/modules/gui/default.nix @@ -13,7 +13,8 @@ _: { ./vivado.nix ./firefox.nix ./steam.nix + ./schizofox.nix ./minecraft.nix - ./emacs.nix +# ./emacs ]; } diff --git a/modules/gui/emacs/default.nix b/modules/gui/emacs/default.nix index 5ecdff6..3d5ed87 100644 --- a/modules/gui/emacs/default.nix +++ b/modules/gui/emacs/default.nix @@ -1,90 +1,5 @@ -{ config, lib, pkgs, ... }: -with lib; let - cfg = config.modules.programs.emacs; - envExtra = '' - export PATH="${config.xdg.configHome}/emacs/bin:$PATH" - ''; - shellAliases = { - e = "emacsclient --create-frame"; # gui - et = "emacsclient --create-frame --tty"; # termimal - }; - librime-dir = "${config.xdg.dataHome}/emacs/librime"; - parinfer-rust-lib-dir = "${config.xdg.dataHome}/emacs/parinfer-rust"; - myEmacsPackagesFor = emacs: ((pkgs.emacsPackagesFor emacs).emacsWithPackages (epkgs: [ - epkgs.vterm - ])); -in { - options.modules.editors.emacs = { - enable = mkEnableOption "Emacs Editor"; - }; - - config = mkIf cfg.enable (mkMerge [ - { - home.packages = with pkgs; [ - ## Doom dependencies - git - (ripgrep.override {withPCRE2 = true;}) - gnutls # for TLS connectivity - - ## Optional dependencies - fd # faster projectile indexing - imagemagick # for image-dired - fd # faster projectile indexing - zstd # for undo-fu-session/undo-tree compression - - # go-mode - # gocode # project archived, use gopls instead - - ## Module dependencies - # :checkers spell - (aspellWithDicts (ds: with ds; [en en-computers en-science])) - # :tools editorconfig - editorconfig-core-c # per-project style config - # :tools lookup & :lang org +roam - sqlite - # :lang latex & :lang org (latex previews) - # texlive.combined.scheme-medium - ]; - - programs.bash.bashrcExtra = envExtra; - programs.zsh.envExtra = envExtra; - home.shellAliases = shellAliases; - programs.nushell.shellAliases = shellAliases; - - xdg.configFile."doom" = { - source = ./doom; - force = true; - }; - - home.activation.installDoomEmacs = lib.hm.dag.entryAfter ["writeBoundary"] '' - ${pkgs.rsync}/bin/rsync -avz --chmod=D2755,F744 ${doomemacs}/ ${config.xdg.configHome}/emacs/ - - # librime for emacs-rime - mkdir -p ${librime-dir} - ${pkgs.rsync}/bin/rsync -avz --chmod=D2755,F744 ${pkgs.librime}/ ${librime-dir}/ - - # libparinfer_rust for emacs' parinfer-rust-mode - mkdir -p ${parinfer-rust-lib-dir} - ${pkgs.rsync}/bin/rsync -avz --chmod=D2755,F744 ${pkgs.vimPlugins.parinfer-rust}/lib/libparinfer_rust.* ${parinfer-rust-lib-dir}/parinfer-rust.so - ''; - } - - let - # Do not use emacs-nox here, which makes the mouse wheel work abnormally in terminal mode. - # pgtk (pure gtk) build add native support for wayland. - # https://www.gnu.org/savannah-checkouts/gnu/emacs/emacs.html#Releases - emacsPkg = myEmacsPackagesFor pkgs.emacs29-pgtk; - in { - home.packages = [emacsPkg]; - services.emacs = { - enable = true; - package = emacsPkg; - client = { - enable = true; - arguments = [" --create-frame"]; - }; - startWithUserSession = true; - }; - } - ]); +_:{ + imports = [ + ./emacs.nix + ]; } diff --git a/modules/gui/emacs.nix b/modules/gui/emacs/emacs.nix similarity index 70% rename from modules/gui/emacs.nix rename to modules/gui/emacs/emacs.nix index 48dd8ca..745d5ef 100644 --- a/modules/gui/emacs.nix +++ b/modules/gui/emacs/emacs.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: +{ config, lib, pkgs, inputs, ... }: with lib; let cfg = config.modules.programs.emacs; username = config.modules.other.system.username; @@ -7,19 +7,14 @@ in { config = mkIf cfg.enable { home-manager.users.${username} = { - programs.emacs = { + programs.doom-emacs = { enable = true; - package = pkgs.emacs; extraConfig = '' (setq standard-indent 2) (require 'evil) (evil-mode 1) ''; - extraPackages = epkgs: [ - epkgs.evil - epkgs.gruvbox-theme - - ]; + doomPrivateDir = ./doom.d; }; }; }; diff --git a/modules/gui/schizofox.nix b/modules/gui/schizofox.nix new file mode 100644 index 0000000..b21ff31 --- /dev/null +++ b/modules/gui/schizofox.nix @@ -0,0 +1,106 @@ +{ config, inputs, lib, ... }: let + cfg = config.modules.programs.schizofox; + inherit (config.modules.other.system) username; + + inherit (lib) mkEnableOption mkIf; +in { + options.modules.programs.schizofox = { + enable = mkEnableOption "schizofox"; + }; + + config = mkIf cfg.enable { + home-manager.users.${username} = { + imports = [ inputs.schizofox.homeManagerModule ]; + + programs.schizofox = { + enable = true; + theme = { + background-darker = "181825"; + background = "1e1e2e"; + foreground = "cdd6f4"; + font = "Lexend"; + simplefox.enable = false; + darkreader.enable = true; + extraCss = '' + body { + color: red !important; + } + ''; + }; + search = { + defaultSearchEngine = "DuckDuckGo"; + removeEngines = ["Google" "Bing" "Amazon.com" "eBay" "Twitter" "Wikipedia"]; + addEngines = [ + { + Name = "NixOS Packages"; + Description = "NixOS Unstable package search"; + Alias = "!np"; + Method = "GET"; + URLTemplate = "https://search.nixos.org/packages?channel=unstable&query={searchTerms}"; + } + { + Name = "NixOS Options"; + Description = "NixOS Unstable option search"; + Alias = "!no"; + Method = "GET"; + URLTemplate = "https://search.nixos.org/options?channel=unstable&query={searchTerms}"; + } + { + Name = "NixOS Wiki"; + Description = "NixOS Wiki search"; + Alias = "!nw"; + Method = "GET"; + URLTemplate = "https://nixos.wiki/index.php?search={searchTerms}"; + } + { + Name = "Home Manager Options"; + Description = "Home Manager option search"; + Alias = "!hm"; + Method = "GET"; + URLTemplate = "https://mipmip.github.io/home-manager-option-search?query={searchTerms}"; + } + { + Name = "Arch Wiki"; + Description = "Arch Wiki search"; + Alias = "!aw"; + Method = "GET"; + URLTemplate = "https://wiki.archlinux.org/index.php?search={searchTerms}"; + } + { + Name = "Gentoo Wiki"; + Description = "Gentoo Wiki search"; + Alias = "!gw"; + Method = "GET"; + URLTemplate = "https://wiki.gentoo.org/index.php?search={searchTerms}"; + } + { + Name = "Debian Wiki"; + Description = "Debian Wiki search"; + Alias = "!dw"; + Method = "GET"; + URLTemplate = "https://wiki.debian.org/FrontPage?action=fullsearch&value={searchTerms}"; + } + ]; + }; + extensions = { + # simplefox.enable = true; + darkreader.enable = true; + # vimium.enable = true; + extraExtensions = { + "webextension@vimium".install_url = "https://addons.mozilla.org/firefox/downloads/file/4259790/vimium_ff-2.1.2.xpi"; + }; + }; + security = { + sanitizeOnShutdown = true; + sandbox = true; + userAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:106.0) Gecko/20100101 Firefox/106.0"; + }; + + misc = { + drmFix = false; + disableWebgl = true; + }; + }; + }; + }; +} diff --git a/modules/other/xdg.nix b/modules/other/xdg.nix index dbae93c..ef08569 100644 --- a/modules/other/xdg.nix +++ b/modules/other/xdg.nix @@ -8,7 +8,7 @@ let file_manager = "pcmanfm.desktop"; media_player = "mpv.desktop"; image_viewer = "imv.desktop"; - text_editor = "nvim.desktop"; + text_editor = "helix.desktop"; terminal = "kitty.desktop"; in { diff --git a/modules/tui/default.nix b/modules/tui/default.nix index 34ce59e..400ffec 100644 --- a/modules/tui/default.nix +++ b/modules/tui/default.nix @@ -1,7 +1,7 @@ _: { imports = [ ./btop.nix -# ./helix.nix + ./helix.nix ./neovim.nix ./newsboat.nix ./ncmpcpp.nix diff --git a/modules/tui/helix.nix b/modules/tui/helix.nix new file mode 100644 index 0000000..4cea684 --- /dev/null +++ b/modules/tui/helix.nix @@ -0,0 +1,30 @@ +{ config, lib, pkgs, inputs, ... }: +with lib; let + cfg = config.modules.programs.helix; + username = config.modules.other.system.username; +in { + options.modules.programs.helix.enable = mkEnableOption "helix"; + + config = mkIf cfg.enable { + home-manager.users.${username} = { + programs.helix = { + enable = true; + settings = { + editor = { + line-number = "relative"; + mouse = false; + bufferline = "multiple"; + lsp.display-messages = true; + cursor-shape = { + insert = "bar"; + }; + }; + keys.normal = { + C-g = [":new" ":insert-output lazygit" ":buffer-close!" ":redraw"]; + esc = ["collapse_selection" "keep_primary_selection"]; + }; + }; + }; + }; + }; +}