-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathhome.nix
178 lines (175 loc) · 4.22 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
171
172
173
174
175
176
177
178
{
config,
pkgs,
lib,
...
}: let
isDarwin = pkgs.stdenv.isDarwin;
doomPath = "${config.home.homeDirectory}/.config/home-manager/doom";
in {
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
home.stateVersion = "24.11";
programs.home-manager.enable = true;
home.packages = with pkgs; [
curl
eza
fzf
gh
glow
jq
mosh
nil
nixd
pre-commit
python312
python312Packages.ipython
ripgrep
rustup
rsync
tio
tlrc
uutils-coreutils-noprefix
zoxide
];
xdg.configFile = {
# ht https://nixos-and-flakes.thiscute.world/best-practices/accelerating-dotfiles-debugging
"doom".source = config.lib.file.mkOutOfStoreSymlink doomPath;
"ghostty/config".text = ''
font-family = Berkeley Mono
font-size = 14
theme = dark:Solarized Dark Higher Contrast,light:rose-pine-dawn
cursor-style = bar
'';
"ideavim/ideavimrc".text = ''
set clipboard+=unnamed
set relativenumber number
'';
"zed/settings.json".source = ./zed_settings.json;
"zellij/layouts/minimal.kdl".text = ''
layout {
pane
pane size=1 borderless=true {
plugin location="zellij:compact-bar"
}
}
'';
};
programs = {
bat = {
enable = true;
config = {
theme = "Solarized (dark)";
pager = "less --RAW-CONTROL-CHARS --quit-if-one-screen --mouse";
map-syntax = [".ignore:Git Ignore" "h:cpp"];
};
extraPackages = with pkgs.bat-extras; [batman];
};
btop = {
enable = true;
settings = {color_theme = "solarized_dark";};
};
direnv = {
enable = true;
nix-direnv.enable = true;
};
emacs = {
enable = true;
};
fish = {
enable = true;
plugins =
map (n: {
name = n;
src = pkgs.fishPlugins.${n}.src;
}) ["hydro" "plugin-git" "sponge" "foreign-env"]
++ [
{
name = "nix-fish";
src = pkgs.fetchFromGitHub {
owner = "kidonng";
repo = "nix.fish";
rev = "ad57d970841ae4a24521b5b1a68121cf385ba71e";
hash = "sha256-GMV0GyORJ8Tt2S9wTCo2lkkLtetYv0rc19aA5KJbo48=";
};
}
];
shellAliases = {
rm = "rm -i";
ls = "eza";
la = "eza -la";
ll = "eza -ll";
};
shellAbbrs = {ec = "emacsclient -nw -c -a 'emacs'";};
loginShellInit = "zoxide init fish | source";
interactiveShellInit =
''
fish_add_path ~/.config/emacs/bin
batman --export-env | source
''
+ lib.optionalString isDarwin ''
fish_add_path /opt/homebrew/bin
'';
};
git = {
enable = true;
userName = "Cooper Pellaton";
userEmail = "[email protected]";
extraConfig = {
branch.autosetuprebase = "always";
color.ui = true;
credential.helper = "store";
diff.renames = "copies";
diff.mnemonicprefix = true;
diff.compactionHeuristic = true;
fetch.prune = true;
init.defaultBranch = "main";
merge.conflictstyle = "diff3";
push.default = "tracking";
push.autoSetupRemote = true;
rebase.autoStash = true;
rerere.enabled = 1;
submodule.recurse = true;
url = {
"ssh://[email protected]/" = {insteadOf = "https://github.com/";};
};
};
difftastic = {
enable = true;
};
lfs = {enable = true;};
};
jujutsu = {
enable = true;
settings = {
user = {
name = "Cooper Pellaton";
email = "[email protected]";
};
};
};
neovim = let
vimConfig = (import ./vim.nix) {inherit pkgs;};
in {
enable = true;
vimAlias = true;
defaultEditor = true;
extraConfig = vimConfig.config;
plugins = vimConfig.plugins;
};
zellij = {
enable = true;
settings = {
theme = "solarized-dark";
ui = {
pane_frames = {
rounded_corners = true;
hide_session_name = true;
};
};
default_layout = "minimal";
};
};
};
# Emacs daemon
# services.emacs.enable = true;
}