-
Notifications
You must be signed in to change notification settings - Fork 1
/
default.nix
55 lines (53 loc) · 1.54 KB
/
default.nix
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
{
config,
lib,
isDarwin,
pkgs,
...
}: let
inherit (config.vyxos) vyxUser;
in {
config = {
nixpkgs.config.packageOverrides = oldPkgs: {
fish = oldPkgs.fish.overrideAttrs {
patches = [
./alias.fish.patch
];
CI = "1"; # XXX: A race test failed when building on sylph.
};
};
environment.shells = [pkgs.fish];
programs.fish.enable = true;
users.users.${vyxUser}.shell = pkgs.fish;
home-manager.users.${vyxUser} = {
home.file = {
".config/fish/functions/vyxnix.fish".source = ./vyxnix.fish;
".config/fish/functions/fish_prompt.fish".source = ./fish_prompt.fish;
".config/fish/functions/fish_jj_prompt.fish".source = ./fish_jj_prompt.fish;
".config/fish/functions/fish_vcs_prompt.fish".source = ./fish_vcs_prompt.fish;
".config/fish/functions/nix_shell_info.fish".source = ./nix_shell_info.fish;
".config/fish/functions/ZZZ.fish".source = ./ZZZ.fish;
};
programs.fish =
{
enable = true;
shellInit = ''
set VYXOS $HOME/g/vyxos
# Don't allow state to accumulate.
rm -f $HOME/.config/fish/fish_variables &>/dev/null
'';
shellAliases = {
ZZ = "$VYXOS/rebuild switch";
VZ = "cd $VYXOS";
};
}
// lib.optionalAttrs isDarwin {
loginShellInit = ''
for p in (string split " " $NIX_PROFILES)
fish_add_path -p -m $p/bin
end
'';
};
};
};
}