nix-community.nixvim/wrappers/hm.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

48 lines
741 B
Nix
Raw Normal View History

self:
{
config,
lib,
...
2024-12-14 11:32:01 -06:00
}:
let
inherit (lib)
mkIf
;
cfg = config.programs.nixvim;
evalArgs = {
extraSpecialArgs = {
hmConfig = config;
};
modules = [
./modules/hm.nix
];
};
in
{
_file = ./hm.nix;
imports = [
(import ./_shared.nix {
inherit self evalArgs;
filesOpt = [
"xdg"
"configFile"
];
})
];
config = mkIf cfg.enable {
home.packages = [
cfg.build.package
];
home.sessionVariables = mkIf cfg.defaultEditor { EDITOR = "nvim"; };
programs = mkIf cfg.vimdiffAlias {
bash.shellAliases.vimdiff = "nvim -d";
fish.shellAliases.vimdiff = "nvim -d";
zsh.shellAliases.vimdiff = "nvim -d";
};
};
}