forked from jb55/nix-files
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfiguration.nix
255 lines (221 loc) · 6.11 KB
/
configuration.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
248
249
250
251
252
253
254
255
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, ... }:
let caches = [ "https://cache.nixos.org/"];
nixfiles = "${home}/etc/nix-files";
machineConfig = import "${nixfiles}/machines/${machine}.nix" pkgs;
zsh = "/run/current-system/sw/bin/zsh";
machine = "monad";
nixpkgsConfig = import "${home}/.nixpkgs/config.nix";
userConfig = (nixpkgsConfig {inherit pkgs;}).userConfig;
home = "/home/jb55";
user = {
name = "jb55";
group = "users";
uid = 1000;
extraGroups = [ "wheel" ];
createHome = true;
home = home;
shell = zsh;
};
flynnCert = "-----BEGIN CERTIFICATE-----\nMIIDBDCCAe6gAwIBAgIRAPEpcMuL9MBoJy4I2TJBwSkwCwYJKoZIhvcNAQELMC0x\nDjAMBgNVBAoTBUZseW5uMRswGQYDVQQLExJGbHlubiBFcGhlbWVyYWwgQ0EwHhcN\nMTUxMTE3MjEzMjM5WhcNMjAxMTE1MjEzMjM5WjAtMQ4wDAYDVQQKEwVGbHlubjEb\nMBkGA1UECxMSRmx5bm4gRXBoZW1lcmFsIENBMIIBIjANBgkqhkiG9w0BAQEFAAOC\nAQ8AMIIBCgKCAQEA4KzIAMp0Itlzilc4qpZJyPI9V1h+D91HJGmGZ4dlbMnU/cr5\nFV32eymw4vT6DxYo4+5LkXQ6FbRQ5fVKvNGwUYC71V0ir7yQc6w8mPYSo2LOCWIB\nk9uC66ERMgiQ0Jaii30ptq9dYJRvwoT7ApgUwOYvvYmD+Xc9x2WQQiThecGEJl4l\nZIO0YuBaqohsBuVByxUuhkpu7A0Kv4qRO3I9rWmRgAzpeTvMaiN+TjaukPjzrxIu\ncRopysKS19yVL1mBnfrPAZIKdiW4KfYH7GnV0dSwUsFH36iO30Tb+WWo3302XDZi\nKDBy8YweYkkj8kQZ6L6R5zgej5bVsE3Pf+BzywIDAQABoyMwITAOBgNVHQ8BAf8E\nBAMCAAYwDwYDVR0TAQH/BAUwAwEB/zALBgkqhkiG9w0BAQsDggEBACdxeKbSpyYG\nIO8SoknVG+l4rDgnLh9p12frRicBfNey7NEn9tJGAZ9tMt9xq/VEksK8GS3reehi\nCzo5Q4vFusgxfBCTglmAmJinZI7PbMTuc2qKcCkHKnBMrKeFENOVPBO90XOAQ5To\nwyy+1NKtxpgEV9FfFxxR5VNCxaOgF7Y8u1YhG0biWKRKcjGcJq9HiASsWeD5m6+S\n+QSk0J/SaIobX/d90IGR54bnubObbspDCGi76FiKxWDOSU0Wi1yNcIbFbdqeSXHV\n5ky3QEopqf4S9D4OLkdauxO6M8cKoSpeDAYLLiViBpLb8WZAafse26Vm34w521pU\nuw2W4U8T+IU=\n-----END CERTIFICATE-----";
in {
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
];
# Use the GRUB 2 boot loader.
boot = {
loader.grub = {
enable = true;
version = 2;
device = "/dev/sda";
};
supportedFilesystems = ["ntfs"];
};
fileSystems = [
{ mountPoint = "/sand";
device = "/dev/disk/by-label/sand";
fsType = "ext4";
}
{ mountPoint = "/home/jb55/.local/share/Steam/steamapps";
device = "/sand/data/SteamAppsLinux";
fsType = "none";
options = "bind";
}
];
programs.ssh.startAgent = false;
time.timeZone = "America/Vancouver";
fonts = {
enableFontDir = true;
enableGhostscriptFonts = true;
enableCoreFonts = true;
fonts = with pkgs; [
corefonts
inconsolata
ubuntu_font_family
fira-code
fira-mono
source-code-pro
ipafont
noto-fonts-emoji
];
};
nix = {
binaryCaches = caches;
trustedBinaryCaches = caches;
binaryCachePublicKeys = [
"hydra.cryp.to-1:8g6Hxvnp/O//5Q1bjjMTd5RO8ztTsG8DKPOAg9ANr2g="
];
};
networking = {
hostName = machine;
extraHosts = ''
174.143.211.135 freenode.znc.jb55.com
6.6.6.187 archer
'';
firewall = {
allowPing = true;
allowedTCPPorts = [ 22 5000 143 ];
};
};
hardware = {
bluetooth.enable = true;
pulseaudio = {
package = pkgs.pulseaudioFull;
enable = true;
support32Bit = true;
};
sane = {
enable = true;
configDir = "${home}/.sane";
};
opengl.driSupport32Bit = true;
};
environment.x11Packages = with pkgs; [
gnome.gnomeicontheme
gtk
hicolor_icon_theme
shared_mime_info
xfce.thunar
xfce.xfce4icontheme # for thunar
];
environment.systemPackages = with pkgs; [
bc
binutils
chromium
dmenu
dropbox-cli
emacs
file
gitAndTools.git-extras
gitFull
haskellPackages.taffybar
hsetroot
htop
lsof
mpc_cli
nix-repl
parcellite
patchelf
redshift
rsync
rxvt_unicode
scrot
silver-searcher
slock
subversion
unzip
vim
vlc
wget
xautolock
xbindkeys
xclip
xdg_utils
xlibs.xev
xlibs.xmodmap
xlibs.xset
zathura
zip
];
nixpkgs.config = nixpkgsConfig;
services.redshift = {
enable = true;
temperature.day = 5700;
temperature.night = 2800;
# gamma=0.8
latitude="49.270186";
longitude="-123.109353";
};
services.zerotierone.enable = true;
services.mpd = {
enable = true;
dataDir = "/sand/mpd";
user = "jb55";
group = "users";
extraConfig = ''
audio_output {
type "pulse"
name "Local MPD"
server "127.0.0.1"
}
'';
};
services.mongodb.enable = true;
services.redis.enable = true;
services.postgresql = {
enable = true;
authentication = "local all all ident";
};
services.xserver = {
enable = true;
layout = "us";
xkbOptions = "terminate:ctrl_alt_bksp, ctrl:nocaps";
startGnuPGAgent = true;
wacom.enable = true;
desktopManager = {
default = "none";
xterm.enable = false;
};
displayManager = {
sessionCommands = "${userConfig}/bin/xinitrc";
lightdm.enable = true;
};
videoDrivers = [ "nvidia" ];
screenSection = ''
Option "metamodes" "1920x1080 +0+0"
'';
windowManager = {
xmonad = {
enable = true;
enableContribAndExtras = true;
extraPackages = hp: [
hp.taffybar
];
};
default = "xmonad";
};
};
virtualisation.virtualbox.host.enable = true;
virtualisation.docker.enable = true;
security.setuidPrograms = [ "slock" ];
security.pki.certificates = [ flynnCert ];
users.extraUsers.jb55 = user;
users.extraGroups.vboxusers.members = [ "jb55" ];
users.extraGroups.docker.members = [ "jb55" ];
users.defaultUserShell = zsh;
users.mutableUsers = true;
# Enable the OpenSSH daemon.
services.openssh = {
enable = true;
passwordAuthentication = false;
};
# Enable CUPS to print documents.
services.printing = {
enable = true;
drivers = [ pkgs.gutenprint ] ;
};
programs.zsh.enable = true;
}