diff --git a/configuration.nix b/configuration.nix index bc45fdb..e8cc5f9 100644 --- a/configuration.nix +++ b/configuration.nix @@ -2,6 +2,7 @@ { imports = [ + ./modules/vim.nix ./modules/display.nix ./modules/sound.nix ./modules/hyprland.nix diff --git a/metallaxis/home.nix b/metallaxis/home.nix index abe5170..4f21a19 100644 --- a/metallaxis/home.nix +++ b/metallaxis/home.nix @@ -14,12 +14,6 @@ home.homeDirectory = "/home/metallaxis"; home.stateVersion = "26.05"; - # Set the default shell for the user - home.sessionVariables = { - EDITOR = "vim"; - VISUAL = "vim"; - }; - # Set sops-age key file path sops.age.keyFile = "${config.home.homeDirectory}/.config/sops/age/keys.txt"; diff --git a/modules/vim.nix b/modules/vim.nix new file mode 100644 index 0000000..dc93691 --- /dev/null +++ b/modules/vim.nix @@ -0,0 +1,27 @@ +{ config, pkgs, ... }: + +{ + programs.vim = { + defaultEditor = true; + customRC = '' + " Enable line numbers + set number + set relativenumber + + " Indentation rules + set tabstop=4 + set shiftwidth=4 + set expandtab + + " Better searching + set hlsearch + set incsearch + set ignorecase + set smartcase + + " Enable syntax highlighting and mouse support + syntax on + set mouse=a + ''; + }; +} \ No newline at end of file diff --git a/root/home.nix b/root/home.nix index a1da043..441c843 100644 --- a/root/home.nix +++ b/root/home.nix @@ -8,10 +8,4 @@ home.username = "root"; home.homeDirectory = "/root"; home.stateVersion = "26.05"; - - # Set the default shell for the user - home.sessionVariables = { - EDITOR = "vim"; - VISUAL = "vim"; - }; } \ No newline at end of file