-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpunky.nix
161 lines (134 loc) · 3.47 KB
/
punky.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
{ ... }:
{
dev-machine = true;
# we use /dev/shm as a staging area for raw disk images, so the extra space is nice
boot.devShmSize = "75%";
# building lots of derivations at once tends to unearth concurrency bugs in build systems
# also, this machine is also constantly streaming music, which we don't want to interupt
nix.settings = {
max-jobs = 2;
cores = 2;
};
services.nix-serve = {
enable = true;
port = 5000;
secretKeyFile = "/etc/nixos/secrets/binary-cache/cache-priv-key.pem";
};
# dnssd for nix store
environment.etc = {
"systemd/dnssd/nix_store.dnssd".text = ''
[Service]
Name=nix_store
Type=_http._tcp
Port=5000
'';
};
# serve DNS stub on local network
services.resolved.extraConfig = ''
DNSStubListenerExtra=192.168.1.12
'';
# bonding ethernet and wireless (with ethernet as primary)
systemd.network = {
netdevs = {
"30-bond0" = {
netdevConfig = {
Kind = "bond";
Name = "bond0";
};
bondConfig = {
Mode = "active-backup";
PrimaryReselectPolicy = "always";
MIIMonitorSec = "1s";
};
};
};
networks = {
"30-enp88s0" = {
matchConfig = {
Name = "enp88s0";
};
networkConfig = {
Bond = "bond0";
PrimarySlave = true;
};
};
"30-wlan0" = {
matchConfig = {
Name = "wlan0";
};
networkConfig = {
Bond = "bond0";
};
};
"30-bond0" = {
matchConfig = {
Name = "bond0";
};
networkConfig = {
DHCP = "no";
MulticastDNS = "yes";
};
addresses = [
{
Address = "192.168.1.12/24";
}
];
routes = [
{
Gateway = "192.168.1.1";
}
];
};
};
};
networking = {
hostName = "punky";
# these get put into /etc/hosts
hosts = {
"192.168.1.1" = [ "asusmain.meow" ];
"192.168.1.2" = [ "asusaux.meow" ];
"192.168.1.10" = [ "rupert.meow" ];
"192.168.1.12" = [ "punky.meow" ];
};
# DNS used by resolved. resolvectl status
nameservers = [
"1.1.1.1"
"8.8.8.8"
];
};
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
boot.initrd.availableKernelModules = [
"xhci_pci"
"thunderbolt"
"ahci"
"nvme"
"usbhid"
"usb_storage"
"sd_mod"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems = {
"/" = {
device = "/dev/disk/by-uuid/cfbddc74-a767-40f2-993d-729d1a5758b9";
fsType = "ext4";
};
"/boot" = {
device = "/dev/disk/by-uuid/4CF2-BE53";
fsType = "vfat";
};
"/home/danielbarter/ML" = {
device = "/dev/disk/by-uuid/308bd10e-7a18-4610-8c7d-757a098ef2dc";
fsType = "ext4";
};
};
hardware.cpu.intel.updateMicrocode = true;
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. It‘s perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "22.11"; # Did you read the comment?
}