initial nixvim
This commit is contained in:
parent
06569493a5
commit
d1adefae9d
8 changed files with 358 additions and 13 deletions
152
flake.lock
152
flake.lock
|
@ -168,6 +168,27 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-parts": {
|
"flake-parts": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs-lib": [
|
||||||
|
"nixvim",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1743550720,
|
||||||
|
"narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=",
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "flake-parts",
|
||||||
|
"rev": "c621e8422220273271f52058f618c94e405bb0f5",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "flake-parts",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-parts_2": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs-lib": [
|
"nixpkgs-lib": [
|
||||||
"stylix",
|
"stylix",
|
||||||
|
@ -226,6 +247,24 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-utils_3": {
|
"flake-utils_3": {
|
||||||
|
"inputs": {
|
||||||
|
"systems": "systems_3"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1731533236,
|
||||||
|
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-utils_4": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"systems": [
|
"systems": [
|
||||||
"stylix",
|
"stylix",
|
||||||
|
@ -246,9 +285,9 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-utils_4": {
|
"flake-utils_5": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"systems": "systems_4"
|
"systems": "systems_5"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1705309234,
|
"lastModified": 1705309234,
|
||||||
|
@ -264,9 +303,9 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-utils_5": {
|
"flake-utils_6": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"systems": "systems_5"
|
"systems": "systems_6"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1710146030,
|
"lastModified": 1710146030,
|
||||||
|
@ -282,9 +321,9 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-utils_6": {
|
"flake-utils_7": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"systems": "systems_6"
|
"systems": "systems_7"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1705309234,
|
"lastModified": 1705309234,
|
||||||
|
@ -460,6 +499,34 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"ixx": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-utils": [
|
||||||
|
"nixvim",
|
||||||
|
"nuschtosSearch",
|
||||||
|
"flake-utils"
|
||||||
|
],
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixvim",
|
||||||
|
"nuschtosSearch",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1737371634,
|
||||||
|
"narHash": "sha256-fTVAWzT1UMm1lT+YxHuVPtH+DATrhYfea3B0MxG/cGw=",
|
||||||
|
"owner": "NuschtOS",
|
||||||
|
"repo": "ixx",
|
||||||
|
"rev": "a1176e2a10ce745ff8f63e4af124ece8fe0b1648",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NuschtOS",
|
||||||
|
"ref": "v0.0.7",
|
||||||
|
"repo": "ixx",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"langref": {
|
"langref": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
|
@ -670,9 +737,31 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nur": {
|
"nixvim": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-parts": "flake-parts",
|
"flake-parts": "flake-parts",
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"nuschtosSearch": "nuschtosSearch"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1745244491,
|
||||||
|
"narHash": "sha256-UlwXkytxGW/aokB9fZ6cSznYKM9ynDLHqhjcPve0KL4=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nixvim",
|
||||||
|
"rev": "7a58109958d14bcece8ec3e2085e41ea3351e387",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nixvim",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nur": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-parts": "flake-parts_2",
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"stylix",
|
"stylix",
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
|
@ -693,6 +782,29 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nuschtosSearch": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-utils": "flake-utils_3",
|
||||||
|
"ixx": "ixx",
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixvim",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1745046075,
|
||||||
|
"narHash": "sha256-8v4y6k16Ra/fiecb4DxhsoOGtzLKgKlS+9/XJ9z0T2I=",
|
||||||
|
"owner": "NuschtOS",
|
||||||
|
"repo": "search",
|
||||||
|
"rev": "066afe8643274470f4a294442aadd988356a478f",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NuschtOS",
|
||||||
|
"repo": "search",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"darwin": "darwin",
|
"darwin": "darwin",
|
||||||
|
@ -704,6 +816,7 @@
|
||||||
"nixos-cosmic": "nixos-cosmic",
|
"nixos-cosmic": "nixos-cosmic",
|
||||||
"nixpkgs": "nixpkgs_2",
|
"nixpkgs": "nixpkgs_2",
|
||||||
"nixpkgs-stable": "nixpkgs-stable_2",
|
"nixpkgs-stable": "nixpkgs-stable_2",
|
||||||
|
"nixvim": "nixvim",
|
||||||
"rust-overlay": "rust-overlay_2",
|
"rust-overlay": "rust-overlay_2",
|
||||||
"stylix": "stylix",
|
"stylix": "stylix",
|
||||||
"zig": "zig",
|
"zig": "zig",
|
||||||
|
@ -759,7 +872,7 @@
|
||||||
"base16-vim": "base16-vim",
|
"base16-vim": "base16-vim",
|
||||||
"firefox-gnome-theme": "firefox-gnome-theme",
|
"firefox-gnome-theme": "firefox-gnome-theme",
|
||||||
"flake-compat": "flake-compat_2",
|
"flake-compat": "flake-compat_2",
|
||||||
"flake-utils": "flake-utils_3",
|
"flake-utils": "flake-utils_4",
|
||||||
"git-hooks": "git-hooks",
|
"git-hooks": "git-hooks",
|
||||||
"gnome-shell": "gnome-shell",
|
"gnome-shell": "gnome-shell",
|
||||||
"home-manager": "home-manager_2",
|
"home-manager": "home-manager_2",
|
||||||
|
@ -767,7 +880,7 @@
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
],
|
],
|
||||||
"nur": "nur",
|
"nur": "nur",
|
||||||
"systems": "systems_3",
|
"systems": "systems_4",
|
||||||
"tinted-foot": "tinted-foot",
|
"tinted-foot": "tinted-foot",
|
||||||
"tinted-kitty": "tinted-kitty",
|
"tinted-kitty": "tinted-kitty",
|
||||||
"tinted-schemes": "tinted-schemes",
|
"tinted-schemes": "tinted-schemes",
|
||||||
|
@ -878,6 +991,21 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"systems_7": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"tinted-foot": {
|
"tinted-foot": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
|
@ -985,7 +1113,7 @@
|
||||||
"zig": {
|
"zig": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat_3",
|
"flake-compat": "flake-compat_3",
|
||||||
"flake-utils": "flake-utils_4",
|
"flake-utils": "flake-utils_5",
|
||||||
"nixpkgs": "nixpkgs_3"
|
"nixpkgs": "nixpkgs_3"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
|
@ -1005,7 +1133,7 @@
|
||||||
"zig-overlay": {
|
"zig-overlay": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat_4",
|
"flake-compat": "flake-compat_4",
|
||||||
"flake-utils": "flake-utils_6",
|
"flake-utils": "flake-utils_7",
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"zls",
|
"zls",
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
|
@ -1027,7 +1155,7 @@
|
||||||
},
|
},
|
||||||
"zls": {
|
"zls": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils_5",
|
"flake-utils": "flake-utils_6",
|
||||||
"gitignore": "gitignore_3",
|
"gitignore": "gitignore_3",
|
||||||
"langref": "langref",
|
"langref": "langref",
|
||||||
"nixpkgs": "nixpkgs_4",
|
"nixpkgs": "nixpkgs_4",
|
||||||
|
|
|
@ -13,6 +13,11 @@
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
nixvim = {
|
||||||
|
url = "github:nix-community/nixvim";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
|
||||||
darwin = {
|
darwin = {
|
||||||
url = "github:lnl7/nix-darwin/master";
|
url = "github:lnl7/nix-darwin/master";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
|
@ -4,9 +4,15 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
userSettings,
|
userSettings,
|
||||||
|
systemSettings,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
programs = import ../../modules/shared/homeManagerPrograms.nix {inherit inputs config pkgs lib userSettings;};
|
imports = [
|
||||||
|
inputs.nixvim.homeManagerModules.nixvim
|
||||||
|
#set up nixvim
|
||||||
|
../../modules/nixvim
|
||||||
|
];
|
||||||
|
programs = import ../../modules/shared/homeManagerPrograms.nix {inherit inputs config pkgs lib userSettings systemSettings;};
|
||||||
|
|
||||||
home = {
|
home = {
|
||||||
inherit (userSettings) username;
|
inherit (userSettings) username;
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
else inputs.stylix.nixosModules.stylix;
|
else inputs.stylix.nixosModules.stylix;
|
||||||
|
|
||||||
systemSettings = rec {
|
systemSettings = rec {
|
||||||
|
inherit darwin;
|
||||||
host =
|
host =
|
||||||
if darwin
|
if darwin
|
||||||
then userSettings.darwinHost
|
then userSettings.darwinHost
|
||||||
|
|
98
modules/nixvim/default.nix
Normal file
98
modules/nixvim/default.nix
Normal file
|
@ -0,0 +1,98 @@
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
nixvim,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports = [
|
||||||
|
./opts.nix
|
||||||
|
./keymaps.nix
|
||||||
|
./plugins
|
||||||
|
];
|
||||||
|
programs.nixvim = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
defaultEditor = true;
|
||||||
|
|
||||||
|
globals = {
|
||||||
|
#Set leader to space, and localleader to \
|
||||||
|
mapleader = " ";
|
||||||
|
maplocalleader = "\\";
|
||||||
|
|
||||||
|
have_nerd_font = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
clipboard = {
|
||||||
|
providers = {
|
||||||
|
wl-copy.enable = true; # For Wayland
|
||||||
|
xsel.enable = true; # For X11
|
||||||
|
};
|
||||||
|
|
||||||
|
# Sync clipboard between OS and Neovim
|
||||||
|
# Remove this option if you want your OS clipboard to remain independent.
|
||||||
|
register = "unnamedplus";
|
||||||
|
};
|
||||||
|
|
||||||
|
opts = {
|
||||||
|
# Show line numbers
|
||||||
|
number = true;
|
||||||
|
# You can also add relative line numbers, to help with jumping.
|
||||||
|
# Experiment for yourself to see if you like it!
|
||||||
|
#relativenumber = true
|
||||||
|
|
||||||
|
# Enable mouse mode, can be useful for resizing splits for example!
|
||||||
|
mouse = "a";
|
||||||
|
|
||||||
|
# Don't show the mode, since it's already in the statusline
|
||||||
|
showmode = false;
|
||||||
|
|
||||||
|
# Enable break indent
|
||||||
|
breakindent = true;
|
||||||
|
|
||||||
|
# Save undo history
|
||||||
|
undofile = true;
|
||||||
|
|
||||||
|
# Case-insensitive searching UNLESS \C or one or more capital letters in the search term
|
||||||
|
ignorecase = true;
|
||||||
|
smartcase = true;
|
||||||
|
|
||||||
|
# Keep signcolumn on by default
|
||||||
|
signcolumn = "yes";
|
||||||
|
|
||||||
|
# Decrease update time
|
||||||
|
updatetime = 250;
|
||||||
|
|
||||||
|
# Decrease mapped sequence wait time
|
||||||
|
# Displays which-key popup sooner
|
||||||
|
timeoutlen = 300;
|
||||||
|
|
||||||
|
# Configure how new splits should be opened
|
||||||
|
splitright = true;
|
||||||
|
splitbelow = true;
|
||||||
|
|
||||||
|
# Sets how neovim will display certain whitespace characters in the editor
|
||||||
|
# See `:help 'list'`
|
||||||
|
# and `:help 'listchars'`
|
||||||
|
list = true;
|
||||||
|
# NOTE: .__raw here means that this field is raw lua code
|
||||||
|
listchars.__raw = "{ tab = '» ', trail = '·', nbsp = '␣' }";
|
||||||
|
|
||||||
|
# Preview substitutions live, as you type!
|
||||||
|
inccommand = "split";
|
||||||
|
|
||||||
|
# Show which line your cursor is on
|
||||||
|
cursorline = true;
|
||||||
|
|
||||||
|
# Minimal number of screen lines to keep above and below the cursor.
|
||||||
|
scrolloff = 10;
|
||||||
|
|
||||||
|
# if performing an operation that would fail due to unsaved changes in the buffer (like `:q`),
|
||||||
|
# instead raise a dialog asking if you wish to save the current file(s)
|
||||||
|
# See `:help 'confirm'`
|
||||||
|
confirm = true;
|
||||||
|
|
||||||
|
# See `:help hlsearch`
|
||||||
|
hlsearch = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
42
modules/nixvim/keymaps.nix
Normal file
42
modules/nixvim/keymaps.nix
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
programs.nixvim = {
|
||||||
|
keymaps = [
|
||||||
|
# Keybinds to make split navigation easier.
|
||||||
|
# Use CTRL+<hjkl> to switch between windows
|
||||||
|
#
|
||||||
|
# See `:help wincmd` for a list of all window commands
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<C-h>";
|
||||||
|
action = "<C-w><C-h>";
|
||||||
|
options = {
|
||||||
|
desc = "Move focus to the left window";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<C-l>";
|
||||||
|
action = "<C-w><C-l>";
|
||||||
|
options = {
|
||||||
|
desc = "Move focus to the right window";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<C-j>";
|
||||||
|
action = "<C-w><C-j>";
|
||||||
|
options = {
|
||||||
|
desc = "Move focus to the lower window";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<C-k>";
|
||||||
|
action = "<C-w><C-k>";
|
||||||
|
options = {
|
||||||
|
desc = "Move focus to the upper window";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
65
modules/nixvim/opts.nix
Normal file
65
modules/nixvim/opts.nix
Normal file
|
@ -0,0 +1,65 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
programs.nixvim = {
|
||||||
|
opts = {
|
||||||
|
# Show line numbers
|
||||||
|
number = true;
|
||||||
|
# You can also add relative line numbers, to help with jumping.
|
||||||
|
# Experiment for yourself to see if you like it!
|
||||||
|
#relativenumber = true
|
||||||
|
|
||||||
|
# Enable mouse mode, can be useful for resizing splits for example!
|
||||||
|
mouse = "a";
|
||||||
|
|
||||||
|
# Don't show the mode, since it's already in the statusline
|
||||||
|
showmode = false;
|
||||||
|
|
||||||
|
# Enable break indent
|
||||||
|
breakindent = true;
|
||||||
|
|
||||||
|
# Save undo history
|
||||||
|
undofile = true;
|
||||||
|
|
||||||
|
# Case-insensitive searching UNLESS \C or one or more capital letters in the search term
|
||||||
|
ignorecase = true;
|
||||||
|
smartcase = true;
|
||||||
|
|
||||||
|
# Keep signcolumn on by default
|
||||||
|
signcolumn = "yes";
|
||||||
|
|
||||||
|
# Decrease update time
|
||||||
|
updatetime = 250;
|
||||||
|
|
||||||
|
# Decrease mapped sequence wait time
|
||||||
|
# Displays which-key popup sooner
|
||||||
|
timeoutlen = 300;
|
||||||
|
|
||||||
|
# Configure how new splits should be opened
|
||||||
|
splitright = true;
|
||||||
|
splitbelow = true;
|
||||||
|
|
||||||
|
# Sets how neovim will display certain whitespace characters in the editor
|
||||||
|
# See `:help 'list'`
|
||||||
|
# and `:help 'listchars'`
|
||||||
|
list = true;
|
||||||
|
# NOTE: .__raw here means that this field is raw lua code
|
||||||
|
listchars.__raw = "{ tab = '» ', trail = '·', nbsp = '␣' }";
|
||||||
|
|
||||||
|
# Preview substitutions live, as you type!
|
||||||
|
inccommand = "split";
|
||||||
|
|
||||||
|
# Show which line your cursor is on
|
||||||
|
cursorline = true;
|
||||||
|
|
||||||
|
# Minimal number of screen lines to keep above and below the cursor.
|
||||||
|
scrolloff = 10;
|
||||||
|
|
||||||
|
# if performing an operation that would fail due to unsaved changes in the buffer (like `:q`),
|
||||||
|
# instead raise a dialog asking if you wish to save the current file(s)
|
||||||
|
# See `:help 'confirm'`
|
||||||
|
confirm = true;
|
||||||
|
|
||||||
|
# See `:help hlsearch`
|
||||||
|
hlsearch = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
0
modules/nixvim/plugins/default.nix
Normal file
0
modules/nixvim/plugins/default.nix
Normal file
Loading…
Reference in a new issue