forked from james-m-thorne/nix-home-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhome.nix
170 lines (152 loc) · 4.18 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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
{ pkgs, ... }:
{
nixpkgs = {
config = {
allowUnfree = true;
allowUnfreePredicate = (_: true);
};
};
# The home-manager manual is at:
#
# https://rycee.gitlab.io/home-manager/release-notes.html
#
# Configuration options are documented at:
#
# https://rycee.gitlab.io/home-manager/options.html
# Home Manager needs a bit of information about you and the
# paths it should manage.
#
# You need to change these to match your username and home directory
# path:
home.username = builtins.getEnv "USER";
home.homeDirectory = builtins.getEnv "HOME";
# If you use non-standard XDG locations, set these options to the
# appropriate paths:
#
# xdg.cacheHome
# xdg.configHome
# xdg.dataHome
# This value determines the Home Manager release that your
# configuration is compatible with. This helps avoid breakage
# when a new Home Manager release introduces backwards
# incompatible changes.
#
# You can update Home Manager without changing this value. See
# the Home Manager release notes for a list of state version
# changes in each release.
home.stateVersion = "24.05";
home.file = {
".ideavimrc".source = ./config/.ideavimrc;
".config/theme.omp.json".source = ./config/theme.omp.json;
".local/bin/bazel".source = "${pkgs.bazelisk}/bin/bazelisk"; # Symlink bazel to bazelisk
};
home.sessionPath = [
"$HOME/.local/bin"
"$HOME/go/bin"
];
# See https://nix-community.github.io/home-manager/options.xhtml for all available options
programs.go.enable = true;
programs.fzf.enable = true;
programs.bat.enable = true;
programs.ripgrep.enable = true;
programs.eza.enable = true;
programs.direnv = {
enable = true;
nix-direnv.enable = true;
};
programs.gh = {
enable = true;
settings = {
git_protocol = "https";
editor = "vim";
prompt = "enabled";
pager = "cat";
aliases = {
co = "pr checkout";
pv = "pr view";
};
};
};
programs.oh-my-posh = {
enable = true;
settings = builtins.fromJSON (builtins.readFile "${toString ./config/theme.omp.json}");
};
programs.zsh = {
enable = true;
enableCompletion = true;
autosuggestion.enable = true;
syntaxHighlighting.enable = true;
shellAliases = {
cat = "bat";
ls = "eza --color=always --no-filesize --icons=always --no-time --no-user --no-permissions";
ll = "ls -l";
gt = "git train";
gta = "git train append";
gtl = "git train last";
gtpr = "git train pr";
gtd = "git train delete";
gts = "git train sync";
gtm = "git train set-merged";
gtsh = "git train show";
gcamp = "_gcamp(){ git commit -am \"$1\" && git push; }; _gcamp";
};
initExtraFirst = ''
# Amazon Q pre block. Keep at the top of this file.
[ -x "$(command -v q)" ] && eval "$(q init zsh pre --rcfile zshrc)"
'';
initExtra = ''
# Source the secrets file
[ -f $HOME/.nixsecrets ] && source $HOME/.nixsecrets
[[ ! $(command -v nix) && -e "/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh" ]] && source "/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh"
[[ ! $(command -v nix) && -e "$HOME/.nix-profile/etc/profile.d/nix.sh" ]] && source "$HOME/.nix-profile/etc/profile.d/nix.sh"
# Amazon Q post block. Keep at the bottom of this file.
[ -x "$(command -v q)" ] && eval "$(q init zsh post --rcfile zshrc)"
'';
oh-my-zsh = {
enable = true;
plugins = [
"git"
"kubectl"
"golang"
"python"
"z"
"gh"
"bazel"
"aws"
"git-prompt"
"gitfast"
"kind"
"fzf"
];
};
};
programs.git = {
enable = true;
userName = "james-m-thorne";
userEmail = "[email protected]";
delta = {
enable = true;
options = {
side-by-side = true;
};
};
};
home.packages = with pkgs;[
(nerdfonts.override { fonts = [ "Meslo" "FiraCode" "CascadiaCode" ]; })
awscli
bazel-buildtools
bazel-gazelle
bazelisk
dbt
htop
jq
kind
kubectl
kubernetes-helm
nodejs
python3
poetry
yarn
yq
];
}