mirror of
https://github.com/CHN-beta/nixos.git
synced 2026-01-12 01:09:24 +08:00
modules.packages.vim: restore
This commit is contained in:
@@ -15,15 +15,7 @@ inputs:
|
||||
settings.theme = "catppuccin_latte";
|
||||
};
|
||||
}];
|
||||
packages.packages._packages =
|
||||
[
|
||||
inputs.pkgs.helix
|
||||
(inputs.pkgs.runCommand "vim" {}
|
||||
''
|
||||
mkdir -p $out/bin
|
||||
ln -s ${inputs.pkgs.helix}/hx $out/bin/vim
|
||||
'')
|
||||
];
|
||||
packages.packages._packages = [ inputs.pkgs.helix ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
30
modules/packages/vim.nix
Normal file
30
modules/packages/vim.nix
Normal file
@@ -0,0 +1,30 @@
|
||||
inputs:
|
||||
{
|
||||
options.nixos.packages.vim = let inherit (inputs.lib) mkOption types; in mkOption
|
||||
{ type = types.nullOr (types.submodule {}); default = {}; };
|
||||
config = let inherit (inputs.config.nixos.packages) vim; in inputs.lib.mkIf (vim != null)
|
||||
{
|
||||
nixos.user.sharedModules =
|
||||
[{
|
||||
config.programs.vim =
|
||||
{
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
packageConfigurable = inputs.config.programs.vim.package;
|
||||
settings =
|
||||
{
|
||||
number = true;
|
||||
expandtab = false;
|
||||
shiftwidth = 2;
|
||||
tabstop = 2;
|
||||
};
|
||||
extraConfig =
|
||||
''
|
||||
set clipboard=unnamedplus
|
||||
colorscheme evening
|
||||
'';
|
||||
};
|
||||
}];
|
||||
programs.vim.package = inputs.pkgs.vim-full;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user