Migrate nvim config

This commit is contained in:
2023-01-02 23:58:41 +00:00
parent 903cbdc9da
commit 447503fadf
10 changed files with 27 additions and 19 deletions

View File

@ -3,7 +3,7 @@
./options.nix
./desktop/firefox.nix
./desktop/gnome.nix
./editors/neovim.nix
./editors/neovim
./editors/vscode.nix
./security/gpg.nix
./security/pass.nix

View File

@ -1,18 +0,0 @@
{ config, lib, pkgs, ... }:
with lib;
with lib.my;
let cfg = config.modules.editors.neovim;
in {
options.modules.editors.neovim = {
enable = mkBoolOpt false;
};
config = mkIf cfg.enable {
home.programs.neovim = {
enable = true;
vimAlias = true;
vimdiffAlias = true;
};
};
}

View File

@ -0,0 +1,26 @@
{ config, lib, pkgs, ... }:
with lib;
with lib.my;
let cfg = config.modules.editors.neovim;
in {
options.modules.editors.neovim = {
enable = mkBoolOpt false;
};
config = mkIf cfg.enable {
user.packages = with pkgs; [
neovim
];
home.configFile = {
"nvim/init.lua" = { source = ./init.lua; };
"nvim/lua" = { source = ./lua; recursive = true; };
};
environment.shellAliases = {
vim = "nvim";
v = "nvim";
};
};
}