thinkpad-nixos/work: Refactor nixvim.extend

This commit is contained in:
traxys 2024-07-15 10:52:54 +02:00
parent 38c6269898
commit e27cc05ed8
2 changed files with 26 additions and 11 deletions

View file

@ -12,14 +12,29 @@
config = {
workAddr = "quentin.boyer@***REMOVED***";
extraNixvim = {
extraConfigLuaPre = ''
team_picker = dofile("${./telescope-team.lua}")
'';
commands = {
Review = "lua team_picker()";
};
};
extraNixvim = [
(
{ helpers, ... }:
{
extraConfigLuaPre = ''
team_picker = dofile("${./telescope-team.lua}")
'';
keymaps = [
{
key = "<leader>R";
mode = [
"n"
"i"
];
action = helpers.mkRaw "team_picker";
}
];
commands = {
Review = "lua team_picker()";
};
}
)
];
home.packages = [
(pkgs.writeShellScriptBin "nwadminSendmail" ''

View file

@ -16,8 +16,8 @@
};
options.extraNixvim = lib.mkOption {
type = lib.types.attrsOf lib.types.anything;
default = { };
type = lib.types.listOf lib.types.anything;
default = [ ];
};
imports = [
@ -84,7 +84,7 @@
;
})
])
++ [ (pkgs.neovimTraxys.nixvimExtend config.extraNixvim) ];
++ [ (pkgs.neovimTraxys.extend { imports = config.extraNixvim; }) ];
nix.registry = {
"my".flake = flake;