forked from kamilchm/nixos-config
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfiguration.nix
executable file
·201 lines (164 loc) · 4.07 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
{ config, pkgs, ... }:
{
nix.nixPath = [ "/home/kamil" "nixos-config=/etc/nixos/configuration.nix" ];
nix.useSandbox = true;
imports =
[
./hardware-configuration.nix
./dnsmasq-configuration.nix
<nixpkgs/nixos/modules/programs/command-not-found/command-not-found.nix>
];
hardware = {
bluetooth = {
enable = true;
extraConfig = ''
[general]
Enable=Source,Sink,Media,Socket
'';
};
pulseaudio.enable = true;
pulseaudio.package = pkgs.pulseaudioFull;
cpu.intel.updateMicrocode = true;
opengl.extraPackages = with pkgs; [ vaapiIntel vaapiVdpau libvdpau-va-gl ];
};
boot = {
vesa = false;
kernelPackages = pkgs.linuxPackages_4_20;
kernelParams = [
"i915.enable_ips=0"
];
extraModprobeConfig = ''
options snd_hda_intel mode=auto power_save=1 index=1
'';
kernel.sysctl = {
"vm.dirty_bytes" = 15000000;
};
loader.grub = {
enable = true;
version = 2;
device = "/dev/sda";
memtest86.enable = false;
configurationLimit = 50;
};
plymouth.enable = true;
supportedFilesystems = [ "exfat" ];
cleanTmpDir = true;
};
time.timeZone = "Europe/Warsaw";
system.stateVersion = "19.03";
networking = {
hostName = "black";
extraHosts = ''
127.0.0.1 black
'';
networkmanager = {
enable = true;
unmanaged = [ "interface-name:ve*" "interface-name:vboxnet*" ];
};
firewall = {
allowedTCPPorts = [ 8080 ];
trustedInterfaces = [ "docker0" ];
checkReversePath = false;
};
};
# Select internationalisation properties.
i18n = {
consoleFont = "lat9w-16";
consoleKeyMap = "pl";
defaultLocale = "pl_PL.UTF-8";
};
nixpkgs.config = {
allowUnfree = true;
packageOverrides = pkgs: {
bluez = pkgs.bluez5;
};
};
environment.systemPackages = with pkgs; [
xlibs.xf86videointel
vaapiIntel
libdrm
xscreensaver
pmutils
networkmanagerapplet
openconnect
networkmanager_openconnect
ntfs3g
gtk-engine-murrine
git
tig
wget
];
programs = {
ssh.startAgent = true;
vim.defaultEditor = true;
};
services = {
acpid.enable = true;
dbus.enable = true;
devmon.enable = true;
printing.enable = true;
udev = {
packages = [ pkgs.libmtp ];
};
udisks2.enable = true;
xserver = {
enable = true;
videoDrivers = [ "intel" ];
layout = "pl";
libinput.enable = true;
synaptics.enable = false;
inputClassSections = [
''
Identifier "Enable libinput for TrackPoint"
MatchIsPointer "on"
Driver "libinput"
Option "Accel Speed" "-0.4"
''
];
desktopManager.xfce.enable = true;
windowManager.qtile.enable = true;
displayManager.sessionCommands = ''
xscreensaver -no-splash &
'';
displayManager.slim.enable = true;
displayManager.slim.extraConfig = ''
sessionstart_cmd ${pkgs.xorg.sessreg}/bin/sessreg -a -l tty7 %user
sessionstop_cmd ${pkgs.xorg.sessreg}/bin/sessreg -d -l tty7 %user
'';
};
physlock.enable = true;
gnome3.at-spi2-core.enable = true;
};
powerManagement = {
enable = true;
scsiLinkPolicy = "max_performance";
};
fonts = {
enableFontDir = true;
enableGhostscriptFonts = true;
fonts = with pkgs; [
corefonts
dejavu_fonts
inconsolata
liberation_ttf
terminus_font
ttf_bitstream_vera
vistafonts
];
};
virtualisation.docker = {
enable = true;
storageDriver = "overlay";
extraOptions = "--dns 172.17.0.1";
};
virtualisation.virtualbox.host.enable = true;
virtualisation.libvirtd = {
enable = true;
qemuPackage = pkgs.qemu_kvm;
};
users.extraUsers.kamil = {
isNormalUser = true;
uid = 1000;
extraGroups = [ "wheel" "networkmanager" "audio" "video" "lp" "power" "disk" "storage" "plugdev" "docker" "libvirtd" "kvm" ];
};
}