global/neovim: init
This commit is contained in:
parent
a3740a9a31
commit
da6002b618
4 changed files with 169 additions and 1 deletions
91
flake.lock
generated
91
flake.lock
generated
|
@ -180,6 +180,27 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"gitignore": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"pre-commit-hooks",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1709087332,
|
||||
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "gitignore.nix",
|
||||
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "gitignore.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
|
@ -313,6 +334,74 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixvim": {
|
||||
"inputs": {
|
||||
"devshell": [
|
||||
"devshell"
|
||||
],
|
||||
"flake-compat": [
|
||||
"blank"
|
||||
],
|
||||
"flake-parts": [
|
||||
"flake-parts"
|
||||
],
|
||||
"home-manager": [
|
||||
"home-manager"
|
||||
],
|
||||
"nix-darwin": [
|
||||
"blank"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"pre-commit-hooks": [
|
||||
"pre-commit-hooks"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1714494971,
|
||||
"narHash": "sha256-7RsTiRKMMrlwuert1QNFvnoPIwl1q1cepR4H8jv2iok=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixvim",
|
||||
"rev": "2483dff03dd326296278213a8e051d375b56d3df",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "nixvim",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"pre-commit-hooks": {
|
||||
"inputs": {
|
||||
"flake-compat": [
|
||||
"blank"
|
||||
],
|
||||
"flake-utils": [
|
||||
"flake-utils"
|
||||
],
|
||||
"gitignore": "gitignore",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"nixpkgs-stable": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1714478972,
|
||||
"narHash": "sha256-q//cgb52vv81uOuwz1LaXElp3XAe1TqrABXODAEF6Sk=",
|
||||
"owner": "cachix",
|
||||
"repo": "pre-commit-hooks.nix",
|
||||
"rev": "2849da033884f54822af194400f8dff435ada242",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "cachix",
|
||||
"repo": "pre-commit-hooks.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"private": {
|
||||
"locked": {
|
||||
"lastModified": 1706954352,
|
||||
|
@ -345,6 +434,8 @@
|
|||
"nixos-hardware": "nixos-hardware",
|
||||
"nixos-wsl": "nixos-wsl",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixvim": "nixvim",
|
||||
"pre-commit-hooks": "pre-commit-hooks",
|
||||
"private": "private",
|
||||
"rust-overlay": "rust-overlay",
|
||||
"stable": "stable",
|
||||
|
|
18
flake.nix
18
flake.nix
|
@ -30,6 +30,9 @@
|
|||
## Rust
|
||||
rust-overlay.url = "github:oxalica/rust-overlay";
|
||||
|
||||
## Neovim
|
||||
nixvim.url = "github:nix-community/nixvim";
|
||||
|
||||
### Cleanup ###
|
||||
## Follow nixpkgs
|
||||
agenix.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
@ -39,6 +42,7 @@
|
|||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
nix-minecraft.inputs.nixpkgs.follows = "nixpkgs";
|
||||
nixos-wsl.inputs.nixpkgs.follows = "nixpkgs";
|
||||
nixvim.inputs.nixpkgs.follows = "nixpkgs";
|
||||
rust-overlay.inputs.nixpkgs.follows = "nixpkgs";
|
||||
universe-cli.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
|
@ -47,6 +51,8 @@
|
|||
agenix.inputs.darwin.follows = "blank";
|
||||
nix-minecraft.inputs.flake-compat.follows = "blank";
|
||||
nixos-wsl.inputs.flake-compat.follows = "blank";
|
||||
nixvim.inputs.flake-compat.follows = "blank";
|
||||
nixvim.inputs.nix-darwin.follows = "blank";
|
||||
|
||||
## Follow flake-utils
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
|
@ -64,6 +70,17 @@
|
|||
|
||||
## Misc
|
||||
agenix.inputs.home-manager.follows = "home-manager";
|
||||
nixvim.inputs.flake-parts.follows = "flake-parts";
|
||||
nixvim.inputs.home-manager.follows = "home-manager";
|
||||
nixvim.inputs.devshell.follows = "devshell";
|
||||
nixvim.inputs.pre-commit-hooks.follows = "pre-commit-hooks";
|
||||
pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix";
|
||||
pre-commit-hooks.inputs = {
|
||||
flake-compat.follows = "blank";
|
||||
flake-utils.follows = "flake-utils";
|
||||
nixpkgs.follows = "nixpkgs";
|
||||
nixpkgs-stable.follows = "nixpkgs";
|
||||
};
|
||||
universe-cli.inputs = {
|
||||
devshell.follows = "devshell";
|
||||
flake-parts.follows = "flake-parts";
|
||||
|
@ -136,6 +153,7 @@
|
|||
home-manager = {
|
||||
sharedModules = [
|
||||
inputs.impermanence.nixosModules.home-manager.impermanence
|
||||
inputs.nixvim.homeManagerModules.nixvim
|
||||
] ++ (self.lib.leaves ./users/modules);
|
||||
};
|
||||
}
|
||||
|
|
60
users/modules/global/neovim.nix
Normal file
60
users/modules/global/neovim.nix
Normal file
|
@ -0,0 +1,60 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
programs.nixvim = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
|
||||
opts = {
|
||||
termguicolors = true;
|
||||
number = true;
|
||||
relativenumber = true;
|
||||
ignorecase = true;
|
||||
smartcase = true;
|
||||
mouse = "a";
|
||||
tabstop = 4;
|
||||
shiftwidth = 4;
|
||||
clipboard = "unnamedplus,unnamed";
|
||||
directory = [
|
||||
"~/.local/share/vim/swap//"
|
||||
"."
|
||||
];
|
||||
};
|
||||
|
||||
globals = {
|
||||
doom_one_cursor_coloring = true;
|
||||
doom_one_terminal_colors = true;
|
||||
doom_one_italic_comments = false;
|
||||
doom_one_enable_treesitter = true;
|
||||
};
|
||||
|
||||
colorscheme = "doom-one";
|
||||
extraPlugins = with pkgs.vimPlugins; [
|
||||
doom-one-nvim
|
||||
];
|
||||
|
||||
globals.mapleader = "<space>";
|
||||
|
||||
autoCmd = [
|
||||
{ event = [ "TermOpen" ]; command = "setlocal nonumber norelativenumber"; }
|
||||
];
|
||||
|
||||
keymaps = [
|
||||
{ key = "<C-w> n"; action = "<C-\\><C-n>"; mode = "t"; }
|
||||
];
|
||||
|
||||
plugins = {
|
||||
comment.enable = true;
|
||||
direnv.enable = true;
|
||||
gitsigns.enable = true;
|
||||
# lsp.enable = true;
|
||||
# nix.enable = true;
|
||||
# nvim-autopairs.enable = true;
|
||||
surround.enable = true;
|
||||
todo-comments.enable = true;
|
||||
treesitter-context.enable = false;
|
||||
treesitter.enable = true;
|
||||
ts-autotag.enable = true;
|
||||
ts-context-commentstring.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,7 +1,6 @@
|
|||
{ ... }: {
|
||||
programs.vim = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
settings = {
|
||||
background = "dark";
|
||||
directory = [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue