feat: isolate neovim and begin second configuration to nixify the first

This commit is contained in:
oddlama 2023-09-21 23:11:36 +02:00
parent 8de313d277
commit bf7ec956ae
No known key found for this signature in database
GPG key ID: 14EFE510775FE39A
6 changed files with 121 additions and 18 deletions

View file

@ -1,11 +1,5 @@
{
programs.neovim = {
enable = true;
viAlias = true;
vimAlias = true;
vimdiffAlias = true;
defaultEditor = true;
};
programs.neovim-custom.enable = true;
home.persistence."/state".directories = [
".local/share/nvim"

View file

@ -1,5 +1,6 @@
{...}: {
imports = [
./neovim.nix
./secrets.nix
./uid.nix

19
users/modules/neovim.nix Normal file
View file

@ -0,0 +1,19 @@
{
lib,
config,
pkgs,
...
}: {
options.programs.neovim-custom = {
enable = lib.mkEnableOption "Neovim";
package = lib.mkPackageOption pkgs "neovim" {};
};
config = lib.mkIf config.programs.neovim-custom.enable {
home = {
# TODO packages = [config.programs.neovim-custom.package];
sessionVariables.EDITOR = "nvim";
shellAliases.vimdiff = "nvim -d";
};
};
}