-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathhome.nix
205 lines (171 loc) · 5.1 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
# [[file:~/repos/neurosys/README.org::*User-level Config][User-level Config:1]]
{ config, pkgs, ... }:
let
homeDir = builtins.getEnv "HOME";
syncDir = builtins.toPath("${homeDir}/Sync");
sources = import ./nix/sources.nix;
nixos20_03 = import sources."nixpkgs-20.03" { };
emacs-overlay = import (import ./nix/sources.nix)."emacs-overlay";
in {
imports = [
./settings.nix
];
home.stateVersion = "20.03";
nixpkgs.config = {
allowUnfree = true;
packageOverrides = pkgs: { stable = nixos20_03; };
};
nixpkgs.overlays = [ emacs-overlay ];
# User-level Config:1 ends here
# [[file:~/repos/neurosys/README.org::*Environment Variables][Environment Variables:1]]
home.sessionVariables = {
EDITOR = "emacsclient --create-frame --alternate-editor emacs";
PASSWORD_STORE_DIR = "${syncDir}/.password-store";
GNUPGHOME = "${syncDir}/.gnupg/";
# GTK2_RC_FILES="${homeDir}/.gtkrc-2.0";
# https://github.com/xmonad/xmonad/issues/126
_JAVA_AWT_WM_NONREPARENTING = "1";
};
# gtk = {
# enable = true;
# iconTheme = {
# name = "Adwaita";
# package = pkgs.gnome3.adwaita-icon-theme;
# };
# theme = {
# name = "Adwaita-dark";
# package = pkgs.gnome3.gnome_themes_standard;
# };
# };
xdg.enable = true;
# Environment Variables:1 ends here
# [[file:~/repos/neurosys/README.org::*Packages][Packages:1]]
home.packages = with pkgs; [
rofi
gnupg
syncthing-cli # provides stcli
(pass.withExtensions (exts: [
exts.pass-otp
exts.pass-genphrase
]))
xtrlock-pam # screen locking
maim # screenshots
rofi-pass # interface to password manager
xclip # programmatic access to clipbaord
arandr # gui for xrandr (monitor layout)
# direnv
# Upstream failing :(
# julia_13
## Doom dependencies
(ripgrep.override {withPCRE2 = true;})
gnutls # for TLS connectivity
## Optional dependencies
fd # faster projectile indexing
imagemagick # for image-dired
pinentry_emacs
## Module dependencies
# :tools lookup & :lang org +roam
sqlite
# :lang latex & :lang org (latex previews)
texlive.combined.scheme-tetex
firefox-beta-bin
];
# Packages:1 ends here
# [[file:~/repos/neurosys/README.org::*Programs][Programs:1]]
programs = {
# Programs:1 ends here
# [[file:~/repos/neurosys/README.org::*Home Manager][Home Manager:1]]
# Let Home Manager install and manage itself.
home-manager.enable = true;
# Home Manager:1 ends here
# [[file:~/repos/neurosys/README.org::*Emacs][Emacs:1]]
emacs = {
enable = true;
# Compile with imagemagick support so I can resize images.
package = pkgs.emacsGit.override { inherit (pkgs) imagemagick; };
};
# Emacs:1 ends here
# [[file:~/repos/neurosys/README.org::*Bash][Bash:1]]
bash = {
enable = true;
historyFile = "${syncDir}/.config/bash/.bash_history";
# FIXME: Document and reduce these
shellOptions = [
"autocd" "cdspell" "dirspell" "globstar" # bash >= 4
"cmdhist" "nocaseglob" "histappend" "extglob"];
};
# Bash:1 ends here
# [[file:~/repos/neurosys/README.org::*Git][Git:1]]
git = {
enable = true;
userName = "${config.settings.name}";
userEmail = "${config.settings.email}";
};
# Git:1 ends here
# [[file:~/repos/neurosys/README.org::*Direnv][Direnv:1]]
# direnv.enable = true;
# Direnv:1 ends here
# [[file:~/repos/neurosys/README.org::*SSH][SSH:1]]
ssh = {
enable = true;
controlMaster = "auto";
controlPath = "/tmp/ssh-%u-%r@%h:%p";
controlPersist = "1800";
forwardAgent = true;
serverAliveInterval = 60;
hashKnownHosts = true;
userKnownHostsFile = "${homeDir}/.ssh/known_hosts";
matchBlocks = {
droplet = {
hostname = "45.55.5.197";
identityFile = "${homeDir}/.ssh/id_rsa";
user = "dgirsh";
};
dangirsh = {
host = "dangirsh.org";
hostname = "ssh.phx.nearlyfreespeech.net";
identityFile = "${homeDir}/.ssh/id_rsa";
user = "dangirsh_dangirsh";
};
nixos-dev = {
hostname = "45.79.58.229";
identityFile = "${homeDir}/.ssh/id_rsa";
user = "dan";
};
};
};
# SSH:1 ends here
# [[file:~/repos/neurosys/README.org::*End][End:1]]
};
# End:1 ends here
# [[file:~/repos/neurosys/README.org::*Services][Services:1]]
services = {
emacs.enable = true;
# redshift = {
# enable = true;
# latitude = "33";
# longitude = "-97";
# temperature.day = 6500;
# temperature.night = 3000;
# };
# https://www.reddit.com/r/emacsporn/comments/euf7m8/doomoutrunelectric_theme_xmonad_nixos/
# https://github.com/willbush/system/blob/371cfa9933f24bca585a3c6c952c41c864d97aa0/nixos/home.nix#L178
# compton = {
# enable = true;
# fade = true;
# backend = "xrender";
# fadeDelta = 1;
# # I only want transparency for a couple of applications.
# opacityRule = [
# "90:class_g ?= 'emacs' && focused"
# "75:class_g ?= 'emacs' && !focused"
# "90:class_g ?= 'alacritty' && focused"
# "75:class_g ?= 'alacritty' && !focused"
# ];
# };
# lorri.enable = true;
};
# Services:1 ends here
# [[file:~/repos/neurosys/README.org::*End][End:1]]
}
# End:1 ends here