Skip to content

Commit 514413f

Browse files
committed
wrappers/hm: add vimdiffAlias option
1 parent 34d56c7 commit 514413f

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

wrappers/hm.nix

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,10 @@ in
5353
inherit (cfg) warnings assertions;
5454
home.sessionVariables = mkIf cfg.defaultEditor { EDITOR = "nvim"; };
5555
}
56+
{
57+
programs.bash.shellAliases = mkIf cfg.vimdiffAlias { vimdiff = "nvim -d"; };
58+
programs.fish.shellAliases = mkIf cfg.vimdiffAlias { vimdiff = "nvim -d"; };
59+
programs.zsh.shellAliases = mkIf cfg.vimdiffAlias { vimdiff = "nvim -d"; };
60+
}
5661
]);
5762
}

wrappers/modules/hm.nix

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,13 @@ with lib;
44
options = {
55
enable = mkEnableOption "nixvim";
66
defaultEditor = mkEnableOption "nixvim as the default editor";
7+
8+
vimdiffAlias = mkOption {
9+
type = types.bool;
10+
default = false;
11+
description = ''
12+
Alias `vimdiff` to `nvim -d`.
13+
'';
14+
};
715
};
816
}

0 commit comments

Comments
 (0)