about summary refs log tree commit diff
path: root/configurations/varda/default.nix
blob: c12c811e4113856d001ccd08382b3ddd2d979eb4 (plain) (blame)
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
{ lib, ... }:
with lib;
{
  imports = attrValues (modulesIn ./.);

  nixfiles.modules = {
    wireguard.client.enable = true;

    sing-box.enable = true;

    games.minecraft.server.enable = false;
  };

  boot = {
    loader = {
      efi.canTouchEfiVariables = true;

      systemd-boot = {
        enable = true;
        configurationLimit = 10;
      };
    };

    initrd.availableKernelModules = [
      "virtio_pci"
      "virtio_scsi"
    ];

    # https://github.com/NixOS/nixpkgs/issues/89025
    # https://forum.netcup.de/administration-of-a-server-vserver/vserver-server-kvm-server/p67571-icmpv6-ra-ndisc-router-discovery-failed-to-add-default-route/#post67571
    # https://superuser.com/questions/33196/how-to-disable-autoconfiguration-on-ipv6-in-linux
    kernel.sysctl = {
      "net.ipv6.conf.all.autoconf" = 0;
      "net.ipv6.conf.all.accept_ra" = 0;
    };
  };

  fileSystems = {
    "/" = {
      device = "/dev/disk/by-uuid/b07e8273-915a-424c-8c55-cdc2bd482f49";
      fsType = "xfs";
      options = [ "noatime" ];
    };

    "/boot" = {
      device = "/dev/disk/by-uuid/03FD-B6C0";
      fsType = "vfat";
    };
  };

  swapDevices = [
    {
      device = "/swapfile";
      size = 4 * 1024;
    }
  ];

  zramSwap = {
    enable = true;
    memoryPercent = 50;
  };
}

Consider giving Nix/NixOS a try! <3