-
Notifications
You must be signed in to change notification settings - Fork 0
/
home.nix
116 lines (108 loc) · 2.85 KB
/
home.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
{ config, flake, pkgs, specialArgs, ... }: {
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
backupFileExtension = "backup";
extraSpecialArgs = specialArgs;
users.${flake.lib.username} = {
home = {
username = flake.lib.username;
homeDirectory = "/home/${flake.lib.username}";
stateVersion = config.system.stateVersion;
packages = with pkgs; [
dnsutils
inetutils
pciutils
xxh
];
};
xdg.configFile."xxh/config.xxhc".text = builtins.toJSON ({
hosts.".*" = {
"+s" = "bash";
"+I" = "xxh-shell-bash";
};
});
# file.logseq".source = flake.nixosConfigurations.${}.lib.file.mkOutOfStoreSymlink "/home/${flake.lib.username}/notes/data";
programs = {
readline = {
enable = true;
extraConfig = ''
set editing-mode vi
set show-mode-in-prompt on
$if term=linux
set vi-ins-mode-string \1\e[?0c\2
set vi-cmd-mode-string \1\e[?8c\2
$else
set vi-ins-mode-string \1\e[6 q\2
set vi-cmd-mode-string \1\e[2 q\2
$endif
'';
};
starship.enable = true;
direnv = {
enable = true;
nix-direnv.enable = true;
};
ssh = {
enable = true;
matchBlocks = {
gitlab = {
host = "gitlab.com";
user = "git";
};
github = {
host = "github.com";
user = "git";
};
};
};
git = {
enable = true;
userName = flake.lib.name;
userEmail = flake.lib.email;
# difftastic.enable = true;
lfs.enable = true;
extraConfig = {
init.defaultBranch = "main";
pull.rebase = false;
commit.verbose = true;
};
};
fzf.enable = true;
ripgrep.enable = true;
gh = {
enable = true;
settings.git_protocol = "ssh";
};
htop = { enable = true; };
jq = { enable = true; };
bash = {
enable = true;
shellAliases = {
cd = "z";
awsp = ''export AWS_PROFILE=$(sed -n "s/\[profile \(.*\)\]/\1/gp" ~/.aws/config | ${pkgs.fzf}/bin/fzf)'';
};
# initExtra = ''
# set -o vi
# '';
};
zoxide.enable = true;
yazi = {
enable = true;
enableBashIntegration = true;
};
neovim = {
enable = true;
viAlias = true;
vimAlias = true;
};
tmux = {
enable = true;
shortcut = "a";
escapeTime = 0;
keyMode = "vi";
};
};
};
};
}