about summary refs log tree commit diff
path: root/machines/aszlig/slylandro.nix
blob: 1bcb7da8642e50a210a21f8ace127fa979c9c201 (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
63
64
65
66
67
68
69
70
71
72
73
74
{ pkgs, lib, ... }:

{
  vuizvui.user.aszlig.profiles.workstation.enable = true;

  boot = {
    loader.systemd-boot.enable = true;
    loader.grub.enable = false;
    loader.efi.canTouchEfiVariables = true;
    kernelPackages = pkgs.linuxPackages_latest;

    initrd = {
      availableKernelModules = [ "xhci_pci" "ahci" "nvme" ];
      luks.devices = {
        slylandro-swap = {
          device = "/dev/disk/by-uuid/30904e53-cc8f-4039-9244-fc648dc6f801";
        };
        slylandro-root = {
          device = "/dev/disk/by-uuid/4b63a017-796b-4608-a6eb-85a47f894d30";
        };
      };
    };
  };

  hardware.cpu.amd.updateMicrocode = true;

  hardware.video.hidpi.enable = true;
  services.xserver.dpi = 188;
  services.xserver.xkbOptions = "caps:none";

  networking.hostName = "slylandro";
  networking.wireless.enable = lib.mkForce true;
  networking.interfaces.bond0.useDHCP = true;

  # This is because the "primary" option below is only supported for the
  # scripted networking configuration.
  systemd.network.networks."40-enp1s0" = {
    networkConfig.PrimarySlave = true;
  };

  networking.bonds.bond0 = {
    interfaces = [ "enp1s0" "wlp3s0" ];
    driverOptions = {
      miimon = "1000";
      mode = "active-backup";
      primary = "enp1s0";
      primary_reselect = "always";
    };
  };

  fileSystems."/boot" = {
    device = "/dev/disk/by-uuid/DF50-CD44";
    fsType = "vfat";
  };

  fileSystems."/" = {
    device = "/dev/disk/by-uuid/87a842a8-e2c5-45b6-8e67-58fec33b5eee";
    fsType = "btrfs";
    options = [
      "autodefrag" "space_cache=v2" "compress=zstd" "noatime" "discard=async"
    ];
  };

  swapDevices = lib.singleton {
    device = "/dev/disk/by-uuid/feace1d7-e48d-4b7e-a601-1515f9b90c20";
  };

  services.tlp.enable = true;

  services.xserver.videoDrivers = [ "amdgpu" ];
  services.xserver.libinput.enable = true;

  nix.maxJobs = 16;
}