blob: 050cb0c1ce1ffaa3d8c91950d823d0591f2a427c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
{
config,
lib,
...
}: let
cfg = config.seth.shell;
in {
options.seth.shell = {
aliases.enable = lib.mkEnableOption "Shell aliases" // {default = true;};
variables.enable = lib.mkEnableOption "Shell variables" // {default = true;};
};
imports = [
./bash.nix
./fish.nix
./nu.nix
./zsh.nix
];
config = {
home = lib.mkMerge [
(lib.mkIf cfg.variables.enable {
sessionVariables = rec {
EDITOR = "nvim";
VISUAL = EDITOR;
CARGO_HOME = "${config.xdg.dataHome}/cargo";
LESSHISTFILE = "${config.xdg.stateHome}/less/history";
};
})
(lib.mkIf cfg.aliases.enable {
shellAliases = {
diff = "diff --color=auto";
g = "git";
gs = "g status";
};
})
];
};
}
|