modules.package.helix: init

This commit is contained in:
陈浩南 2024-10-14 13:53:07 +08:00
parent 319c3b227c
commit c64b905cb3
3 changed files with 18 additions and 31 deletions

View File

@ -0,0 +1,17 @@
inputs:
{
options.nixos.packages.helix = let inherit (inputs.lib) mkOption types; in mkOption
{ type = types.nullOr (types.submodule {}); default = {}; };
config = let inherit (inputs.config.nixos.packages) helix; in inputs.lib.mkIf (helix != null)
{
nixos.user.sharedModules =
[{
config.programs.helix =
{
enable = true;
defaultEditor = true;
settings.theme = "catppuccin_latte";
};
}];
};
}

View File

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

View File

@ -8,7 +8,7 @@ inputs:
package = inputs.pkgs.gitFull;
extraConfig =
{
core.editor = if inputs.config.nixos.system.gui.preferred then "code --wait" else "vim";
core.editor = "hx";
http.postBuffer = 624288000;
advice.detachedHead = false;
merge.conflictstyle = "diff3";