-
Notifications
You must be signed in to change notification settings - Fork 0
/
home.nix
247 lines (232 loc) · 6.17 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
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
{
config,
pkgs,
inputs,
...
}:
{
# Enbable Nix Flakes
nix = {
# package = pkgs.nix;
settings.experimental-features = [
"nix-command"
"flakes"
];
};
# Home Manager needs a bit of information about you and the paths it manages
home.username = "amber";
home.homeDirectory = "/home/amber";
home.stateVersion = "24.05"; # Please read the comment before changing.
home.packages = with pkgs; [
(catppuccin-kvantum.override {
accent = "Pink";
variant = "Macchiato";
})
libsForQt5.qtstyleplugin-kvantum
libsForQt5.qt5ct
papirus-folders
fira-code
fira-code-symbols
font-awesome
nerdfonts
noto-fonts
noto-fonts-emoji
proggyfonts
(nerdfonts.override {
fonts = [
"CascadiaCode"
"CodeNewRoman"
"FantasqueSansMono"
"Iosevka"
"ShareTechMono"
"Hermit"
"JetBrainsMono"
"FiraCode"
"FiraMono"
"Hack"
"Hasklig"
"Ubuntu"
"UbuntuMono"
];
})
];
# Home Manager is pretty good at managing dotfiles. The primary way to manage
# plain files is through 'home.file'.
home.file = {
# # Building this configuration will create a copy of 'dotfiles/screenrc' in
# # the Nix store. Activating the configuration will then make '~/.screenrc' a
# # symlink to the Nix store copy.
# ".screenrc".source = dotfiles/screenrc;
# # You can also set the file content immediately.
# ".gradle/gradle.properties".text = ''
# org.gradle.console=verbose
# org.gradle.daemon.idletimeout=3600000
# '';
};
# Home Manager can also manage your environment variables through
# 'home.sessionVariables'. These will be explicitly sourced when using a
# shell provided by Home Manager. If you don't want to manage your shell
# through Home Manager then you have to manually source 'hm-session-vars.sh'
# located at either
#
# ~/.nix-profile/etc/profile.d/hm-session-vars.sh
#
# or
#
# ~/.local/state/nix/profiles/profile/etc/profile.d/hm-session-vars.sh
#
# or
#
# /etc/profiles/per-user/amber/etc/profile.d/hm-session-vars.sh
nixpkgs = {
overlays = [
(final: prev: {
vimPlugins = prev.vimPlugins // {
candyland-nvim = prev.vimUtils.buildVimPlugin {
name = "candyland"; # package in nix
src = inputs.plugin-candyland;
};
};
})
];
};
programs.neovim =
let
toLua = str: "lua << EOF\n${str}\nEOF\n";
toLuaFile = file: "lua << EOF\n${builtins.readFile file}\nEOF\n";
in {
enable = true;
extraPackages = with pkgs; [
lua-language-server
rust-analyzer
xclip
wl-clipboard
ltex-ls
typst-live
];
plugins = with pkgs.vimPlugins; [
{
plugin = nvim-lspconfig;
config = toLuaFile ./nvim/plugin/lsp.lua;
}
{
plugin = comment-nvim;
config = toLua "require(\"Comment\").setup()";
}
{
plugin = nvim-cmp;
config = toLuaFile ./nvim/plugin/cmp.lua;
}
{
plugin = telescope-nvim;
config = toLuaFile ./nvim/plugin/telescope.lua;
}
{
plugin = candyland-nvim;
config = "colorscheme candyland";
}
{
plugin = which-key-nvim;
config = toLuaFile ./nvim/plugin/which-key.lua;
}
{
plugin = toggleterm-nvim;
config = toLuaFile ./nvim/plugin/terminal.lua;
}
cmp_luasnip
cmp-nvim-lsp
friendly-snippets
neodev-nvim
telescope-fzf-native-nvim
vimtex
# nixfmt-rfc-style
colorizer
luasnip
lualine-nvim
nvim-web-devicons
{
plugin = (nvim-treesitter.withPlugins (p: [
p.tree-sitter-nix
p.tree-sitter-vim
p.tree-sitter-bash
p.tree-sitter-lua
p.tree-sitter-python
p.tree-sitter-json
p.tree-sitter-rust
p.treesitter-grammar-typst
]));
config = toLuaFile ./nvim/plugin/treesitter.lua;
}
vim-nix
];
extraLuaConfig = ''
${builtins.readFile ./nvim/options.lua}
'';
};
#Add support for ./local/bin
home.sessionPath = [
"$HOME/.local/bin"
];
imports = [
./waybar.nix
./wlogout.nix
./zathura.nix
];
dconf.settings = {
"org/gnome/desktop/interface" = {
color-scheme = "prefer-dark";
};
};
home = {
# EDITOR = "emacs";
# GTK_THEME = "catppuccin-macchiato-pink-standard";
sessionVariables = {
XCURSOR_THEME = "oreo_spark_light_pink_bordered_cursors";
XCURSOR_SIZE = "15";
HYPRCURSOR_THEME = "oreo_spark_light_pink_bordered_cursors";
HYPRCURSOR_SIZE = "15";
};
};
# Let Home Manager install and manage itself. programs.home-manager.enable = true;
gtk = {
enable = true;
theme = {
name = "catppuccin-macchiato-pink-standard";
package = pkgs.catppuccin-gtk.override {
accents = [ "pink" ];
size = "standard";
variant = "macchiato";
};
};
font = {
name = "FiraCode";
package = pkgs.fira-code-symbols;
size = 11;
};
cursorTheme.package = pkgs.oreo-cursors-plus;
cursorTheme.name = "oreo_spark_light_pink_bordered_cursors";
iconTheme.package = pkgs.beauty-line-icon-theme;
iconTheme.name = "BeautyLine";
};
qt = {
enable = true;
platformTheme.name = "gtk2";
style.name = "adwaita-dark";
style.package = pkgs.adwaita-qt;
};
xdg.mimeApps = {
enable = true;
associations.added = {
"application/pdf" = [ "org.pwmt.zathura-pdf-mupdf.desktop" ];
};
defaultApplications = {
"application/pdf" = [ "org.pwmt.zathura-pdf-mupdf.desktop" ];
"inode/directory" = [ "nemo.desktop" ];
};
};
xdg.configFile = {
"gtk-4.0/assets".source = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}/gtk-4.0/assets";
"gtk-4.0/gtk.css".source = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}/gtk-4.0/gtk.css";
"gtk-4.0/gtk-dark.css".source = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}/gtk-4.0/gtk-dark.css";
};
}