-
Notifications
You must be signed in to change notification settings - Fork 0
/
home.nix
185 lines (160 loc) · 4.26 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
{ pkgs, ... }:
let
secrets = import ./secrets.nix;
shellUtilities = [
# visualize dot files with the dot command
# https://graphviz.org/
pkgs.graphviz
# traverse json with the jq command
# https://stedolan.github.io/jq/
pkgs.jq
# make it so terminals can print images nicely, maybe
# https://saitoha.github.io/libsixel/
pkgs.libsixel
# faster grep with rg
# https://github.com/BurntSushi/ripgrep
pkgs.ripgrep
# view full file tree under cwd with tree
pkgs.tree
];
systemUtilities = [
# record terminal activity
# https://asciinema.org/
pkgs.asciinema
# transparent (to end-user) encrypt/decrypt of secrets in a git repository
# https://github.com/AGWA/git-crypt
pkgs.git-crypt
# nicer view of system resource utilization
# https://htop.dev/
pkgs.htop
# curl for humans
# https://httpie.io/
pkgs.httpie
# all kinds of image utilities, mainly I use it for converting between formats
# https://imagemagick.org/index.php
pkgs.imagemagick
# library-ization of the claim that all structured text is the same
# https://pandoc.org/
pkgs.pandoc
# https://github.com/jaspervdj/patat
pkgs.haskellPackages.patat
# also like upgraded curl but mainly useful for downloading files
# https://www.gnu.org/software/wget/
pkgs.wget
# presentations from the terminal
];
# Packages I need because it'll be a nix-y system
ourobouros = [
pkgs.bash-completion
pkgs.nixpkgs-fmt
];
patchedFonts = [
(pkgs.nerdfonts.override { fonts = [ "Hasklig" "SourceCodePro" ]; })
];
treesitterGrammars = (p:
(import attrs/treesitterGrammars.nix) { inherit p; }
);
in
{
# Home Manager needs a bit of information about you and the
# paths it should manage.
home.username = builtins.getEnv "USER";
home.homeDirectory = builtins.getEnv "HOME";
# 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 = "23.05";
xdg.configFile.nvim = {
source = ./dotfiles/neovim;
recursive = true;
};
xdg.configFile.fish = {
source = ./dotfiles/fish;
recursive = true;
};
xdg.configFile."fish/secrets.fish".text = ''
set -gx CACHIX_AUTH_TOKEN ${secrets.cachixToken}
'';
xdg.configFile."direnv/lib" = {
source = ./dotfiles/direnv/lib;
recursive = true;
};
programs = {
# Let Home Manager install and manage itself.
home-manager.enable = true;
git = {
enable = true;
};
lazygit = {
enable = true;
settings = {
gui = {
nerdFontsVersion = "3";
theme = {
lightTheme = true;
};
};
};
};
neovim = {
enable = true;
viAlias = true;
vimAlias = true;
plugins = (import ./attrs/vimPlugins.nix) {
vimPlugins = pkgs.vimPlugins;
inherit pkgs treesitterGrammars;
};
extraLuaPackages = (ps:
[
ps.lua-curl
ps.mimetypes
ps.xml2lua
]);
extraPackages = with pkgs;
[
dhall-lsp-server
fzf
lua-language-server
nil
nodePackages.typescript-language-server
pyright
python3Packages.pylatexenc
silicon
terraform-ls
];
};
direnv = {
enable = true;
nix-direnv.enable = true;
};
# Enable and configure zshell
fish = {
enable = true;
plugins = with pkgs.fishPlugins; [
{ name = "bass"; src = bass.src; }
];
};
# Enable starship, a universal prompt controller
starship = {
enable = true;
enableFishIntegration = true;
settings = import ./dotfiles/starship.nix;
};
# Enable and configure tmux
tmux = {
enable = true;
extraConfig = builtins.readFile ./dotfiles/tmux.conf;
};
};
fonts.fontconfig.enable = true;
home.packages =
shellUtilities ++
systemUtilities ++
ourobouros ++
patchedFonts;
}