2024-07-08 05:51:51 +01:00
|
|
|
self:
|
2023-11-06 16:26:23 +01:00
|
|
|
{
|
2023-02-20 11:42:13 +01:00
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
...
|
2024-12-14 11:32:01 -06:00
|
|
|
}:
|
2023-02-20 11:42:13 +01:00
|
|
|
let
|
2022-11-07 23:12:40 +08:00
|
|
|
inherit (lib)
|
|
|
|
mkIf
|
|
|
|
;
|
2022-10-17 15:08:17 +02:00
|
|
|
cfg = config.programs.nixvim;
|
2024-10-11 00:23:40 +01:00
|
|
|
evalArgs = {
|
2024-09-24 10:19:12 +01:00
|
|
|
extraSpecialArgs = {
|
|
|
|
hmConfig = config;
|
|
|
|
};
|
|
|
|
modules = [
|
|
|
|
./modules/hm.nix
|
|
|
|
];
|
|
|
|
};
|
2023-02-20 11:42:13 +01:00
|
|
|
in
|
|
|
|
{
|
2024-09-25 16:22:25 +01:00
|
|
|
_file = ./hm.nix;
|
|
|
|
|
2024-07-08 05:00:44 +01:00
|
|
|
imports = [
|
|
|
|
(import ./_shared.nix {
|
2024-12-15 06:51:20 +00:00
|
|
|
inherit self evalArgs;
|
2024-07-08 05:00:44 +01:00
|
|
|
filesOpt = [
|
|
|
|
"xdg"
|
|
|
|
"configFile"
|
|
|
|
];
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2024-09-24 11:25:43 +01:00
|
|
|
config = mkIf cfg.enable {
|
|
|
|
home.packages = [
|
2024-09-24 07:02:22 +01:00
|
|
|
cfg.build.package
|
2025-01-20 13:50:50 +00:00
|
|
|
];
|
2024-09-24 11:25:43 +01:00
|
|
|
|
|
|
|
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";
|
|
|
|
};
|
|
|
|
};
|
2022-10-17 15:08:17 +02:00
|
|
|
}
|