From 3e129d796dfe3ae152af5f3a4b69d3ee0d11530f Mon Sep 17 00:00:00 2001 From: Himadri Bhattacharjee <107522312+lavafroth@users.noreply.github.com> Date: Tue, 16 Apr 2024 10:53:50 +0530 Subject: [PATCH] refactor: move helix into its own module --- hosts/default/helix.nix | 14 ++++++++++++++ hosts/default/home.nix | 29 ++++++++--------------------- 2 files changed, 22 insertions(+), 21 deletions(-) create mode 100644 hosts/default/helix.nix diff --git a/hosts/default/helix.nix b/hosts/default/helix.nix new file mode 100644 index 0000000..815c8f7 --- /dev/null +++ b/hosts/default/helix.nix @@ -0,0 +1,14 @@ +{pkgs, ... }: { + programs.helix = { + enable = true; + settings = { + theme = "base16_terminal"; + editor.cursor-shape.insert = "bar"; + editor.line-number = "relative"; + editor.idle-timeout = 0; + keys.normal."X" = [ "extend_line_up" "extend_to_line_bounds" ]; + keys.select."X" = [ "extend_line_up" "extend_to_line_bounds" ]; + keys.normal."C-g" = [ ":new" ":insert-output ${pkgs.lazygit}/bin/lazygit" ":buffer-close!" ":redraw" ]; + }; + }; +} diff --git a/hosts/default/home.nix b/hosts/default/home.nix index 213a7a8..df2537a 100644 --- a/hosts/default/home.nix +++ b/hosts/default/home.nix @@ -3,16 +3,17 @@ { imports = [ - # ./gnome.nix - ./kde.nix - ./python.nix - ./rust.nix + ./aws.nix + ./benchmarking.nix ./ctf.nix ./gaming.nix - ./notetaking.nix - ./benchmarking.nix - ./aws.nix ./git.nix + # ./gnome.nix + ./helix.nix + ./kde.nix + ./notetaking.nix + ./python.nix + ./rust.nix ./shell.nix ]; @@ -52,20 +53,6 @@ }; programs = { - - helix = { - enable = true; - settings = { - theme = "adwaita-dark"; - editor.cursor-shape.insert = "bar"; - editor.line-number = "relative"; - editor.idle-timeout = 0; - keys.normal."X" = [ "extend_line_up" "extend_to_line_bounds" ]; - keys.select."X" = [ "extend_line_up" "extend_to_line_bounds" ]; - keys.normal."C-g" = [ ":new" ":insert-output ${pkgs.lazygit}/bin/lazygit" ":buffer-close!" ":redraw" ]; - }; - }; - direnv = { enable = true; nix-direnv.enable = true;