Refactor nixvim to move it as standalone package instead of nixos module

This commit is contained in:
ulic-youthlic 2025-07-13 06:04:55 +08:00
parent 92ec57e83f
commit c75945ddba
Signed by: youthlic
GPG key ID: 63E86C3C14A0D721
8 changed files with 24 additions and 68 deletions

View file

@ -59,6 +59,7 @@
localsend
zulip
wechat
nixvim
];
environment.variables.EDITOR = "hx";

View file

@ -37,7 +37,6 @@
};
programs = {
bash.enable = true;
nixvim.enable = true;
guix.enable = true;
dae.enable = true;
openssh.enable = true;
@ -91,6 +90,7 @@
waypipe
wineWow64Packages.waylandFull
iperf3
nixvim
sbctl
];

View file

@ -1,25 +0,0 @@
{
lib,
config,
...
}: let
cfg = config.youthlic.programs.nixvim;
in {
imports = lib.youthlic.loadImports ./.;
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

@ -1,42 +0,0 @@
{
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;
};
};
};
}