diff --git a/hosts/common/default.nix b/hosts/common/default.nix index 81b867ea..29389d6a 100644 --- a/hosts/common/default.nix +++ b/hosts/common/default.nix @@ -71,19 +71,6 @@ # disable non-required packages like nano, perl, rsync, strace environment.defaultPackages = []; - # programs.vim.defaultEditor = true; - environment.variables = { - EDITOR = "vim"; - # git claims it should use EDITOR, but it doesn't! - GIT_EDITOR = "vim"; - # TODO: these should be moved to `home.sessionVariables` (home-manager) - # Electron apps should use native wayland backend: - # https://nixos.wiki/wiki/Slack#Wayland - # Discord under sway crashes with this. - # NIXOS_OZONE_WL = "1"; - # LIBGL_ALWAYS_SOFTWARE = "1"; - }; - # dconf docs: # find keys/values with `dconf dump /` programs.dconf.enable = true; diff --git a/hosts/common/programs/assorted.nix b/hosts/common/programs/assorted.nix index ecfbbcea..b6803c2b 100644 --- a/hosts/common/programs/assorted.nix +++ b/hosts/common/programs/assorted.nix @@ -43,6 +43,7 @@ let lsof miniupnpc nano + neovim netcat nethogs nmap @@ -124,7 +125,7 @@ let lm_sensors # for sensors-detect. TODO: what needs this? lift into the consumer lshw # memtester - neovim + neovim # needed as a user package, for swap persistence # nettools # networkmanager nixpkgs-review diff --git a/hosts/common/programs/neovim.nix b/hosts/common/programs/neovim.nix index ed4bdfdc..dfb042aa 100644 --- a/hosts/common/programs/neovim.nix +++ b/hosts/common/programs/neovim.nix @@ -81,7 +81,12 @@ let in { # private because there could be sensitive things in the swap - sane.programs.neovim.persist.private = [ ".cache/vim-swap" ]; + sane.programs.neovim = { + persist.private = [ ".cache/vim-swap" ]; + env.EDITOR = "vim"; + # git claims it should use EDITOR, but it doesn't! + env.GIT_EDITOR = "vim"; + }; programs.neovim = mkIf config.sane.programs.neovim.enabled { # neovim: https://github.com/neovim/neovim