-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathconfiguration-eve.nix
367 lines (346 loc) · 10 KB
/
configuration-eve.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
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
# Edit this configuration file which defines what would be installed on the
# system. To Help while choosing option value, you can watch at the manual
# page of configuration.nix or at the last chapter of the manual available
# on the virtual console 8 (Alt+F8).
{ pkgs, ... }:
{
require = [
./hardware.nix
./intel-xts-luksroot-sda.nix
./filesystems-boot-root-tmptmpfs.nix
./nobeep.nix
];
boot = {
extraModprobeConfig = ''
options thinkpad_acpi fan_control=1
'';
initrd.luks.devices = [ { name = "luksroot"; device = "/dev/sda3";
allowDiscards = true; } ];
# powertop needs msr and so far it does not load when needed
kernelModules = [ "msr" ];
kernelPackages = pkgs.linuxPackages_3_16;
# major:minor number of my swap device, fully lvm-based system
#resumeDevice = "254:1";
};
environment = {
#nix = pkgs.nixUnstable;
# To also get the header files in the system environment. You only need
# this if you want compile non-nixos stuff against the system environment.
# You would only want that as a part of temporary solution to continue on
# whatever you were working before christmas. However, there are better
# ways. See https://github.com/chaoflow/nixos-configurations for more on
# that.
#pathsToLink = ["include"];
# shellInit = ''
# export GEM_PATH=/var/run/current-system/sw/${pkgs.ruby.gemPath}
# export RUBYLIB=/var/run/current-system/sw/lib
# export RUBYOPT=rubygems
# '';
systemPackages = with pkgs; [
acpitool
alsaLib
alsaPlugins
alsaUtils
cpufrequtils
cryptsetup
ddrescue
dmenu
file
hdparm
htop
keychain
sdparm
zsh
ant
autoconf
automake
bazaar
bazaarTools
bc
beret
cmake
colordiff
cvs
cvsps
gcc
gdb
geeqie
ghostscript
gimp
gitAndTools.gitFull
gitAndTools.svn2git
gitAndTools.tig
gnupg
gnupg1
gnumake
gperf
graphviz
guile
imagemagick
io
irssi
jscoverage
jwhois
links2
lsof
lua5
lxdvdrip
lynx
man
mdbtools
mercurial
ncftp
netcat
nmap
openvpn
p7zip
parted
pdfjam
pinentry
powertop
pwgen
qrencode
rtorrent
ruby
screen
stdmanpages
subversion
tcpdump
telnet
(let myTexLive =
pkgs.texLiveAggregationFun {
paths =
[ pkgs.texLive
pkgs.texLiveCMSuper
pkgs.texLiveExtra
pkgs.texLiveBeamer ];
};
in myTexLive)
units
unzip
vim
vlc
w3m
wget
zip
gv
glxinfo
mplayer
rxvt_unicode
qemu_kvm
scrot
unetbootin
xlockmore
xorg.xkill
xpdf
haskellPackages.xmonad
haskellPackages.xmonadContrib
haskellPackages.xmonadExtras
stalonetray
wpa_supplicant_gui
xfontsel
xlibs.xev
xlibs.xinput
xlibs.xmessage
xlibs.xmodmap
];
};
# XXX: add more fonts!
fonts = {
enableCoreFonts = true;
enableFontDir = true;
enableGhostscriptFonts = false;
# terminus I use for rxvt-unicode
# see https://github.com/chaoflow/chaoflow.skel.home/blob/master/.Xdefaults
fonts = [
#pkgs.cantarell_fonts
#pkgs.dejavu_fonts
#pkgs.dosemu_fonts
#pkgs.freefont_ttf
#pkgs.liberation_ttf
pkgs.terminus_font
#pkgs.ubuntu_font_family
#pkgs.ucsFonts
#pkgs.unifont
#pkgs.vistafonts
#pkgs.xlibs.fontadobe100dpi
#pkgs.xlibs.fontadobe75dpi
#pkgs.xlibs.fontadobeutopia100dpi
#pkgs.xlibs.fontadobeutopia75dpi
#pkgs.xlibs.fontadobeutopiatype1
#pkgs.xlibs.fontarabicmisc
pkgs.xlibs.fontbh100dpi
pkgs.xlibs.fontbh75dpi
pkgs.xlibs.fontbhlucidatypewriter100dpi
pkgs.xlibs.fontbhlucidatypewriter75dpi
pkgs.xlibs.fontbhttf
pkgs.xlibs.fontbhtype1
pkgs.xlibs.fontbitstream100dpi
pkgs.xlibs.fontbitstream75dpi
pkgs.xlibs.fontbitstreamtype1
#pkgs.xlibs.fontcronyxcyrillic
pkgs.xlibs.fontcursormisc
pkgs.xlibs.fontdaewoomisc
pkgs.xlibs.fontdecmisc
pkgs.xlibs.fontibmtype1
pkgs.xlibs.fontisasmisc
pkgs.xlibs.fontjismisc
pkgs.xlibs.fontmicromisc
pkgs.xlibs.fontmisccyrillic
pkgs.xlibs.fontmiscethiopic
pkgs.xlibs.fontmiscmeltho
pkgs.xlibs.fontmiscmisc
pkgs.xlibs.fontmuttmisc
pkgs.xlibs.fontschumachermisc
pkgs.xlibs.fontscreencyrillic
pkgs.xlibs.fontsonymisc
pkgs.xlibs.fontsunmisc
pkgs.xlibs.fontwinitzkicyrillic
pkgs.xlibs.fontxfree86type1
];
};
hardware.pulseaudio.enable = true;
# per user is broken (for me?)
hardware.pulseaudio.systemWide = true;
hardware.trackpoint.enable = true;
hardware.trackpoint.sensitivity = 255;
#hardware.trackpoint.speed = 255;
# Select internationalisation properties.
i18n = {
consoleFont = "lat9w-16";
consoleKeyMap = "us";
defaultLocale = "en_US.UTF-8";
};
networking = {
domain = "chaoflow.net";
# hardcode domain name
# extraHosts = ''
# 127.0.0.1 eve.chaoflow.net eve
# '';
firewall = {
allowedTCPPorts = [ 80 ];
enable = true;
};
hostName = "eve";
interfaceMonitor.enable = false; # Watch for plugged cable.
# host network for qemu-kvm
localCommands = ''
ip addr add 10.0.0.1/24 dev lo
${pkgs.procps}/sbin/sysctl -w net.ipv4.ip_forward=1
'';
networkmanager.enable = false;
wireless.enable = true;
wireless.driver = "nl80211";
wireless.interfaces = [ "wlp2s0" ];
wireless.userControlled.enable = true;
};
nix.extraOptions = ''
auto-optimise-store = true
env-keep-derivations = true
gc-keep-outputs = true
gc-keep-derivations = true
'';
nix.useChroot = true;
nixpkgs.config = {
# XXX: unused so far
xkeyboard_config = { extraLayoutPath = "./xkb-layout/chaoflow"; };
};
powerManagement.cpuFreqGovernor = "ondemand";
powerManagement.enable = true;
#powerManagement.aggressive = true;
users.defaultUserShell = "/var/run/current-system/sw/bin/zsh";
security.pam.loginLimits = [
{ domain = "@audio"; item = "rtprio"; type = "-"; value = "99"; }
];
services.atd.enable = false;
services.dovecot2.enable = true;
services.dovecot2.enablePop3 = false;
services.dovecot2.mailLocation = "maildir:~/.mail";
services.dovecot2.extraConfig = ''
listen = 127.0.0.1
namespace {
separator = /
inbox = yes
}
'';
services.httpd = {
adminAddr = "[email protected]";
enable = true;
enablePHP = true;
enableUserDir = true;
};
services.locate.enable = true;
services.nixosManual.showManual = false;
services.openssh.enable = false;
services.printing.enable = true;
services.printing.drivers = [ pkgs.foomatic_filters ];
services.postfix = {
destination = [ "localhost" "eve.chaoflow.net" ];
enable = true;
extraConfig = ''
# For all options see ``man 5 postconf``
# Take care, empty lines will mess up whitespace removal. It would be
# nice if empty lines would not be considered in minimal leading
# whitespace analysis, but don't know about further implications. Also
# take care not to mix tabs and spaces. Should tabs be treated like 8
# spaces?
#
# ATTENTION! Will log passwords
#debug_peer_level = 4
#debug_peer_list = tesla.chaoflow.net
inet_interfaces = loopback-only
#
# the nixos config option does not allow to specify a port, beware:
# small 'h' in contrast to the config option with capital 'H'
relayhost = [0x2c.org]:submission
#relayhost = [127.0.0.1]:1587
#
#XXX: needs server certificate checking
#smtp_enforce_tls = yes
#
# postfix generic map example content:
# Run ``# postmap hash:/etc/nixos/cfg-private/postfix_generic_map``
# after changing it.
smtp_generic_maps = hash:/etc/nixos/cfg-private/postfix_generic_map
smtp_sasl_auth_enable = yes
smtp_sasl_mechanism_filter = plain, login
#
# username and password for smtp auth, example content:
# <relayhost> <username>:<password>
# The <relayhost> is exactly what you specified for relayHost, resp.
# relayhost.
smtp_sasl_password_maps = hash:/etc/nixos/cfg-private/postfix_passwd
smtp_sasl_security_options = noanonymous
smtp_sasl_tls_security_options = $smtp_sasl_security_options
smtp_use_tls = yes
'';
hostname = "eve.chaoflow.net";
rootAlias = "cfl";
};
services.thinkfan.enable = true;
services.xserver = {
autorun = true;
# no desktop manager, no window manager configured here. This
# results in only one session *custom* for slim which executes
# ~/.xsession. See:
# https://github.com/chaoflow/chaoflow.skel.home/blob/master/.xsession
desktopManager.xterm.enable = false;
displayManager.slim = {
defaultUser = "cfl";
#hideCursor = true;
};
enable = true;
exportConfiguration = true;
# custom is set in ./bin/init_keyboard.sh via .xsession with the
# advantage of not breaking X in case the layout did not make it into the
# newest profile generation
layout = "us";
};
# List swap partitions that are mounted at boot time.
#swapDevices = [{ label = "swap"; }];
#time.timeZone = "Asia/Hong_Kong";
time.timeZone = "Europe/Berlin";
#time.timeZone = "US/Eastern";
#time.timeZone = "US/Pacific";
}