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
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
|
{ config, pkgs, lib, ... }:
{
vuizvui.user.devhell.profiles.base.enable = true;
vuizvui.system.kernel.bfq.enable = true;
boot = {
loader.grub = {
enable = true;
version = 2;
devices = [
"/dev/disk/by-id/ata-ST31500541AS_6XW0NK21"
"/dev/disk/by-id/ata-ST31500541AS_6XW0P0CW"
"/dev/disk/by-id/ata-Samsung_SSD_850_EVO_250GB_S21PNSAG848626F"
"/dev/disk/by-id/ata-Samsung_SSD_850_EVO_250GB_S21PNSAG848674K"
];
};
initrd = {
availableKernelModules = [ "ehci_pci" "ahci" "firewire_ohci" "usbhid" "usb_storage" ];
kernelModules = [ "fuse" ];
};
kernelParams = [ "pci=noaer" ];
kernelModules = [ "kvm-intel" ];
extraModulePackages = [ ];
blacklistedKernelModules = [ "pcspkr" ];
};
hardware = {
cpu.intel.updateMicrocode = true;
opengl = {
extraPackages = [ pkgs.vaapiVdpau ];
};
};
fileSystems."/" = {
label = "nixos";
fsType = "btrfs";
options = [
"autodefrag"
"space_cache"
"compress=lzo"
"noatime"
"ssd"
];
};
fileSystems."/home" = {
label = "home";
fsType = "btrfs";
options = [
"autodefrag"
"space_cache"
"compress=lzo"
"noatime"
];
};
swapDevices = [
{ device = "/dev/disk/by-uuid/16bd9abd-6af5-4a24-8ea5-58adc51e9641"; }
{ device = "/dev/disk/by-uuid/279708cb-f9c3-4a37-a064-80ff85a66f88"; }
{ device = "/dev/disk/by-uuid/0c2409c3-e824-4759-a9ad-9bfcea1e73bb"; }
{ device = "/dev/disk/by-uuid/3f1835a8-5587-4963-9b6c-66ecb36059de"; }
];
networking.hostName = "sigrun";
networking.wireless.enable = false;
networking.useNetworkd = true;
nix.maxJobs = 8;
i18n = {
defaultLocale = "en_US.UTF-8";
};
console = {
font = "Lat2-Terminus16";
keyMap = "dvorak";
};
powerManagement.powerUpCommands = ''
${pkgs.hdparm}/sbin/hdparm -B 255 \
/dev/disk/by-id/ata-ST31500541AS_6XW0NK21
${pkgs.hdparm}/sbin/hdparm -B 255 \
/dev/disk/by-id/ata-ST31500541AS_6XW0P0CW
'';
#### Machine-specific service configuration ####
vuizvui.user.devhell.profiles.services.enable = true;
services = {
printing = {
enable = true;
drivers = [ pkgs.hplipWithPlugin ];
};
thermald.enable = true;
timesyncd.enable = true;
resolved.enable = true;
canto-daemon.enable = true;
offlineimap = {
enable = true;
install = true;
path = [ pkgs.notmuch ];
};
syncthing = {
enable = true;
user = "dev";
dataDir = "/home/dev/syncthing/";
};
};
services.xserver = {
enable = true;
layout = "dvorak";
videoDrivers = [ "ati" ];
serverLayoutSection = ''
Screen "Center/Right"
Screen "Left" LeftOf "Center/Right"
'';
config = ''
Section "ServerLayout"
Identifier "Multihead layout"
Screen "Center/Right"
Screen "Left" LeftOf "Center/Right"
EndSection
Section "Device"
Identifier "Radeon HD 4650 PCIEx8"
Driver "radeon"
BusId "PCI:2:0:0"
Option "monitor-DVI-1" "Left monitor"
EndSection
Section "Device"
Identifier "Radeon HD 4650 PCIEx16"
Driver "radeon"
BusID "PCI:1:0:0"
Option "monitor-DVI-0" "Center monitor"
Option "monitor-HDMI-0" "Right monitor"
EndSection
Section "Screen"
Identifier "Center/Right"
Monitor "Left monitor"
Device "Radeon HD 4650 PCIEx16"
EndSection
Section "Screen"
Identifier "Left"
Device "Radeon HD 4650 PCIEx8"
EndSection
Section "Monitor"
Identifier "Left monitor"
EndSection
Section "Monitor"
Identifier "Center monitor"
Option "LeftOf" "Right monitor"
Option "Primary" "true"
EndSection
Section "Monitor"
Identifier "Right monitor"
EndSection
'';
# XXX: Factor out and make DRY, because a lot of the stuff here is
# duplicated in the other machine configurations.
displayManager.sessionCommands = ''
${pkgs.xorg.xsetroot}/bin/xsetroot -solid black
${pkgs.rofi}/bin/rofi &
${pkgs.xorg.xrdb}/bin/xrdb "${pkgs.writeText "xrdb.conf" ''
Xft.dpi: 96
Xft.antialias: true
Xft.hinting: full
Xft.hintstyle: hintslight
Xft.rgba: rgb
Xft.lcdfilter: lcddefault
Xft.autohint: 1
XTerm.termName: xterm-256color
XTerm*bellIsUrgent: true
XTerm*utf8: 1
XTerm*locale: true
XTerm*utf8Title: true
XTerm*utf8Fonts: true
XTerm*utf8Latin1: true
XTerm*dynamicColors: true
XTerm*eightBitInput: true
Xcursor.theme: Vanilla-DMZ-AA
Xcursor.size: 22
*.charClass:33:48,35:48,37:48,43:48,45-47:48,61:48,63:48,64:48,95:48,126:48,35:48,58:48
XTerm*faceName: xft:DejaVu Sans Mono for Powerline:pixelsize=12:antialias=true:hinting=true
XTerm*faceNameDoublesize: xft:Unifont:pixelsize=12:antialias=true:hinting=true
XTerm*cursorColor: #545f65
XTerm*saveLines: 10000
! Base16 Twilight
! Scheme: David Hart (http://hart-dev.com)
#define base00 #1e1e1e
#define base01 #323537
#define base02 #464b50
#define base03 #5f5a60
#define base04 #838184
#define base05 #a7a7a7
#define base06 #c3c3c3
#define base07 #ffffff
#define base08 #cf6a4c
#define base09 #cda869
#define base0A #f9ee98
#define base0B #8f9d6a
#define base0C #afc4db
#define base0D #7587a6
#define base0E #9b859d
#define base0F #9b703f
*.foreground: base05
*.background: base00
*.cursorColor: base05
*.color0: base00
*.color1: base08
*.color2: base0B
*.color3: base0A
*.color4: base0D
*.color5: base0E
*.color6: base0C
*.color7: base05
*.color8: base03
*.color9: base09
*.color10: base01
*.color11: base02
*.color12: base04
*.color13: base06
*.color14: base0F
*.color15: base07
! ------------------------------------------------------------------------------
! ROFI Color theme & Settings
! ------------------------------------------------------------------------------
rofi.modi: run
rofi.opacity: 85
rofi.width: 100
rofi.lines: 3
rofi.padding: 450
rofi.bw: 0
rofi.eh: 2
rofi.color-enabled: true
rofi.color-window: #393939, #393939, #268bd2
rofi.color-normal: #393939, #ffffff, #393939, #268bd2, #ffffff
rofi.color-active: #393939, #268bd2, #393939, #268bd2, #205171
rofi.color-urgent: #393939, #f3843d, #393939, #268bd2, #ffc39c
''}"
DISPLAY=:0.1 ${pkgs.windowmaker}/bin/wmaker &
'';
};
#### Machine-specific packages configuration ####
vuizvui.user.devhell.profiles.packages.enable = true;
nixpkgs.config.mpv.bs2bSupport = true;
environment.systemPackages = with pkgs; [
canto-curses
cmus
];
}
|