Add nixvim module to config basic option for neovim

This commit is contained in:
ulic-youthlic 2025-06-03 17:29:02 +08:00
parent 07dcd7e606
commit 317a2b4a28
Signed by: youthlic
GPG key ID: 63E86C3C14A0D721
7 changed files with 259 additions and 25 deletions

208
flake.lock generated
View file

@ -101,7 +101,7 @@
"nur-ataraxiasjel",
"devenv"
],
"nixpkgs": "nixpkgs_5"
"nixpkgs": "nixpkgs_6"
},
"locked": {
"lastModified": 1744206633,
@ -193,7 +193,7 @@
"flake-compat": "flake-compat_3",
"git-hooks": "git-hooks",
"nix": "nix",
"nixpkgs": "nixpkgs_7"
"nixpkgs": "nixpkgs_8"
},
"locked": {
"lastModified": 1748273445,
@ -324,6 +324,27 @@
}
},
"flake-parts_2": {
"inputs": {
"nixpkgs-lib": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1751413152,
"narHash": "sha256-Tyw1RjYEsp5scoigs1384gIg6e0GoBVjms4aXFfRssQ=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "77826244401ea9de6e3bac47c2db46005e1f30b5",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_3": {
"inputs": {
"nixpkgs-lib": [
"nur",
@ -344,7 +365,7 @@
"type": "github"
}
},
"flake-parts_3": {
"flake-parts_4": {
"inputs": {
"nixpkgs-lib": [
"nur-ataraxiasjel",
@ -367,7 +388,7 @@
"type": "github"
}
},
"flake-parts_4": {
"flake-parts_5": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib_2"
},
@ -417,6 +438,24 @@
"type": "github"
}
},
"flake-utils_2": {
"inputs": {
"systems": "systems_2"
},
"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"
}
},
"flakey-profile": {
"locked": {
"lastModified": 1712898590,
@ -578,6 +617,34 @@
"type": "github"
}
},
"ixx": {
"inputs": {
"flake-utils": [
"nixvim",
"nuschtosSearch",
"flake-utils"
],
"nixpkgs": [
"nixvim",
"nuschtosSearch",
"nixpkgs"
]
},
"locked": {
"lastModified": 1748294338,
"narHash": "sha256-FVO01jdmUNArzBS7NmaktLdGA5qA3lUMJ4B7a05Iynw=",
"owner": "NuschtOS",
"repo": "ixx",
"rev": "cc5f390f7caf265461d4aab37e98d2292ebbdb85",
"type": "github"
},
"original": {
"owner": "NuschtOS",
"ref": "v0.0.8",
"repo": "ixx",
"type": "github"
}
},
"jovian": {
"inputs": {
"nix-github-actions": "nix-github-actions",
@ -720,9 +787,9 @@
"nur-ataraxiasjel",
"devenv"
],
"flake-parts": "flake-parts_3",
"flake-parts": "flake-parts_4",
"libgit2": "libgit2",
"nixpkgs": "nixpkgs_6",
"nixpkgs": "nixpkgs_7",
"nixpkgs-23-11": [
"nur-ataraxiasjel",
"devenv"
@ -889,6 +956,22 @@
"type": "github"
}
},
"nixpkgs_10": {
"locked": {
"lastModified": 1747958103,
"narHash": "sha256-qmmFCrfBwSHoWw7cVK4Aj+fns+c54EBP8cGqp/yK410=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "fe51d34885f7b5e3e7b59572796e1bcb427eccb1",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1751011381,
@ -922,6 +1005,22 @@
}
},
"nixpkgs_4": {
"locked": {
"lastModified": 1751786137,
"narHash": "sha256-lIlUKVGCGsh0Q2EA7/6xRtKUZjaQ/ur8uUyY+MynHXQ=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "ceb24d94c6feaa4e8737a8e2bd3cf71c3a7eaaa0",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_5": {
"locked": {
"lastModified": 1751984180,
"narHash": "sha256-LwWRsENAZJKUdD3SpLluwDmdXY9F45ZEgCb0X+xgOL0=",
@ -937,7 +1036,7 @@
"type": "github"
}
},
"nixpkgs_5": {
"nixpkgs_6": {
"locked": {
"lastModified": 1733212471,
"narHash": "sha256-M1+uCoV5igihRfcUKrr1riygbe73/dzNnzPsmaLCmpo=",
@ -953,7 +1052,7 @@
"type": "github"
}
},
"nixpkgs_6": {
"nixpkgs_7": {
"locked": {
"lastModified": 1717432640,
"narHash": "sha256-+f9c4/ZX5MWDOuB1rKoWj+lBNm0z0rs4CK47HBLxy1o=",
@ -969,7 +1068,7 @@
"type": "github"
}
},
"nixpkgs_7": {
"nixpkgs_8": {
"locked": {
"lastModified": 1746807397,
"narHash": "sha256-zU2z0jlkJGWLhdNr/8AJSxqK8XD0IlQgHp3VZcP56Aw=",
@ -985,7 +1084,7 @@
"type": "github"
}
},
"nixpkgs_8": {
"nixpkgs_9": {
"locked": {
"lastModified": 1748190013,
"narHash": "sha256-R5HJFflOfsP5FBtk+zE8FpL8uqE7n62jqOsADvVshhE=",
@ -1001,26 +1100,31 @@
"type": "github"
}
},
"nixpkgs_9": {
"nixvim": {
"inputs": {
"flake-parts": "flake-parts_2",
"nixpkgs": "nixpkgs_4",
"nuschtosSearch": "nuschtosSearch",
"systems": "systems_3"
},
"locked": {
"lastModified": 1747958103,
"narHash": "sha256-qmmFCrfBwSHoWw7cVK4Aj+fns+c54EBP8cGqp/yK410=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "fe51d34885f7b5e3e7b59572796e1bcb427eccb1",
"lastModified": 1752158208,
"narHash": "sha256-XbXYLUtaB/wHvZYefvaDPbo4eYj27kbtowHfww9bqLw=",
"owner": "nix-community",
"repo": "nixvim",
"rev": "b728cf43d97814df43f5d9bd9dafac9072ccd9e8",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"owner": "nix-community",
"repo": "nixvim",
"type": "github"
}
},
"nur": {
"inputs": {
"flake-parts": "flake-parts_2",
"nixpkgs": "nixpkgs_4"
"flake-parts": "flake-parts_3",
"nixpkgs": "nixpkgs_5"
},
"locked": {
"lastModified": 1752148075,
@ -1040,8 +1144,8 @@
"inputs": {
"devenv": "devenv",
"devenv-root": "devenv-root",
"flake-parts": "flake-parts_4",
"nixpkgs": "nixpkgs_8"
"flake-parts": "flake-parts_5",
"nixpkgs": "nixpkgs_9"
},
"locked": {
"lastModified": 1751641756,
@ -1082,6 +1186,29 @@
"type": "github"
}
},
"nuschtosSearch": {
"inputs": {
"flake-utils": "flake-utils_2",
"ixx": "ixx",
"nixpkgs": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1749730855,
"narHash": "sha256-L3x2nSlFkXkM6tQPLJP3oCBMIsRifhIDPMQQdHO5xWo=",
"owner": "NuschtOS",
"repo": "search",
"rev": "8dfe5879dd009ff4742b668d9c699bc4b9761742",
"type": "github"
},
"original": {
"owner": "NuschtOS",
"repo": "search",
"type": "github"
}
},
"root": {
"inputs": {
"betterfox-nix": "betterfox-nix",
@ -1098,6 +1225,7 @@
"nixos-cosmic": "nixos-cosmic",
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs_3",
"nixvim": "nixvim",
"nur": "nur",
"nur-ataraxiasjel": "nur-ataraxiasjel",
"sops-nix": "sops-nix",
@ -1203,7 +1331,7 @@
"nixpkgs"
],
"nur": "nur_2",
"systems": "systems_2",
"systems": "systems_4",
"tinted-foot": "tinted-foot",
"tinted-kitty": "tinted-kitty",
"tinted-schemes": "tinted-schemes",
@ -1254,6 +1382,36 @@
"type": "github"
}
},
"systems_3": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_4": {
"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": {
"flake": false,
"locked": {
@ -1337,7 +1495,7 @@
},
"treefmt-nix": {
"inputs": {
"nixpkgs": "nixpkgs_9"
"nixpkgs": "nixpkgs_10"
},
"locked": {
"lastModified": 1752055615,

View file

@ -178,5 +178,11 @@
owner = "AtaraxiaSjel";
repo = "nur";
};
nixvim = {
type = "github";
owner = "nix-community";
repo = "nixvim";
};
};
}

View file

@ -46,6 +46,7 @@
};
programs = {
bash.enable = true;
nixvim.enable = true;
guix.enable = true;
dae.enable = true;
openssh.enable = true;

View file

@ -28,5 +28,6 @@
./obs.nix
./sudo-rs.nix
./garage.nix
./nixvim
];
}

View file

@ -0,0 +1,25 @@
{
lib,
config,
...
}: let
cfg = config.youthlic.programs.nixvim;
in {
imports = [./option.nix];
options = {
youthlic.programs.nixvim = {
enable = lib.mkEnableOption "nixvim";
};
};
config = lib.mkIf cfg.enable {
programs.nixvim = {
enable = true;
enableMan = true;
colorschemes.gruvbox-material = {
enable = true;
autoLoad = true;
};
plugins.lualine.enable = true;
};
};
}

View file

@ -0,0 +1,42 @@
{
lib,
config,
...
}: let
cfg = config.youthlic.programs.nixvim;
in {
config = lib.mkIf cfg.enable {
programs.nixvim = {
opts = {
backspace = ["indent" "eol" "start"];
tabstop = 4;
shiftwidth = 4;
expandtab = true;
shiftround = true;
autoindent = true;
nu = true;
rnu = true;
wildmenu = true;
hlsearch = false;
ignorecase = true;
smartcase = true;
completeopt = ["menu" "noselect"];
cursorline = true;
termguicolors = true;
signcolumn = "yes";
autoread = true;
title = true;
swapfile = false;
backup = false;
updatetime = 50;
mouse = "a";
undofile = true;
exrc = true;
scrolloff = 5;
wrap = true;
splitright = true;
splitbelow = true;
};
};
};
}

View file

@ -12,6 +12,7 @@
disko.nixosModules.disko
lix-module.nixosModules.default
chaotic.nixosModules.default
nixvim.nixosModules.nixvim
./..
];