summary refs log tree commit diff
path: root/machines/lapin/devices.nix
blob: 239242af640694597a7bf1654b323740475dd016 (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
{ lib, ... }:

{
  boot = {
    loader.systemd-boot.enable = true;
    kernelModules = [ ];
  };

  # 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"
      ];
    };
  };
}