modules/wrapper: move RC features to wrapper/rc

This commit is contained in:
raf 2024-04-21 02:10:06 +03:00
commit d9a984bf6f
No known key found for this signature in database
GPG key ID: 02D1DD3FA08B6B29
10 changed files with 539 additions and 479 deletions

View file

@ -0,0 +1,59 @@
{
config,
lib,
...
}: let
inherit (lib.modules) mkIf;
cfg = config.vim;
in {
config = {
vim.maps = {
normal =
mkIf cfg.disableArrows {
"<up>" = {
action = "<nop>";
noremap = false;
};
"<down>" = {
action = "<nop>";
noremap = false;
};
"<left>" = {
action = "<nop>";
noremap = false;
};
"<right>" = {
action = "<nop>";
noremap = false;
};
}
// mkIf cfg.mapLeaderSpace {
"<space>" = {
action = "<nop>";
};
};
insert = mkIf cfg.disableArrows {
"<up>" = {
action = "<nop>";
noremap = false;
};
"<down>" = {
action = "<nop>";
noremap = false;
};
"<left>" = {
action = "<nop>";
noremap = false;
};
"<right>" = {
action = "<nop>";
noremap = false;
};
};
};
};
}

View file

@ -1,59 +1,6 @@
{
config,
lib,
...
}: let
inherit (lib.modules) mkIf;
cfg = config.vim;
in {
config = {
vim.maps = {
normal =
mkIf cfg.disableArrows {
"<up>" = {
action = "<nop>";
noremap = false;
};
"<down>" = {
action = "<nop>";
noremap = false;
};
"<left>" = {
action = "<nop>";
noremap = false;
};
"<right>" = {
action = "<nop>";
noremap = false;
};
}
// mkIf cfg.mapLeaderSpace {
"<space>" = {
action = "<nop>";
};
};
insert = mkIf cfg.disableArrows {
"<up>" = {
action = "<nop>";
noremap = false;
};
"<down>" = {
action = "<nop>";
noremap = false;
};
"<left>" = {
action = "<nop>";
noremap = false;
};
"<right>" = {
action = "<nop>";
noremap = false;
};
};
};
};
imports = [
./config.nix
#./options.nix
];
}

View file