blob: abc7a18814ddf67a48e2be58c22d2df22df7899f (
plain)
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
|
{ lib, ... }:
{
boot = {
loader.systemd-boot.enable = true;
kernelModules = [ ];
kernel.sysctl = {
# nixos likes 24 as the default here, but lapin
# somehow only allows upto 18.
# TODO: check why it's stuck at 18 in the kernel config.
# `zcat /proc/config.gz | grep MMAP_RND_BITS`
"vm.mmap_rnd_bits" = 18;
};
};
# testing with replacing swap partitions
# and files in lieu of zram.
zramSwap = {
enable = true;
algorithm = "zstd";
swapDevices = 1;
memoryPercent = 50;
};
# static ipv6 + dhcp ipv4
systemd.network.networks."10-wan" = {
name = "enp1s0";
DHCP = "ipv4";
address = [ "2a01:4f8:c012:9493::1" ];
routes = [ { Gateway = "fe80::1"; } ];
};
services.resolved = {
# llmnr and multicastdns both give dns timeouts.
# mdns specifically for some reason gives docker bridge interfaces it's scope,
# which means every dns request waits for an answer... from every interface...
llmnr = "false";
extraConfig = "MulticastDNS=no";
dnssec = "false"; # dnssec breaks ipv6, for some reason :(
};
fileSystems = {
# mount the large-ish service state folder to a regrowable volume. :)
"/srv" = {
device = "/dev/disk/by-id/scsi-0HC_Volume_101611810";
fsType = "ext4";
options = [
"defaults"
"discard"
];
};
};
}
|