summaryrefslogtreecommitdiff
path: root/hosts/kaworu/default.nix
blob: cab2e3da55cf98f5049780d21abd8d8b121e6bd6 (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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# Kaworu
# System configuration for my desktop
{
  inputs,
  options,
  ...
}:
inputs.nixpkgs.lib.nixosSystem rec {
  system = "x86_64-linux";
  specialArgs = {inherit inputs;};
  modules = [
    options
    ../../config
    ../../home
    ../../programs
    ../../system
    {
      # options
      hostName = "kaworu";
      monitors = [
        {
          name = "HDMI-A-1";
          scale = 1.0;
        }
      ];

      # hardware
      hardware.graphics.enable = true;
      hardware.bluetooth.enable = true;

      # bootloader
      boot.loader.systemd-boot.enable = true;
      boot.loader.efi = {
        canTouchEfiVariables = true;
        efiSysMountPoint = "/boot/efi";
      };

      # kernel modules
      boot.initrd.availableKernelModules = [
        "xhci_pci"
        "ahci"
        "usb_storage"
        "usbhid"
        "sd_mod"
      ];
      boot.initrd.kernelModules = [];
      boot.kernelModules = ["kvm-amd"];
      boot.extraModulePackages = [];

      # firmware
      hardware.enableRedistributableFirmware = true;
      hardware.cpu.amd.updateMicrocode = true;

      # luks device
      boot.initrd.luks.devices."root".device = "/dev/disk/by-uuid/89257280-202b-4565-b832-89f160d5e4e2";

      # root
      fileSystems."/" = {
        device = "/dev/disk/by-uuid/4906f0dd-b036-40fc-9a3f-0d031dbc2513";
        fsType = "btrfs";
      };

      # boot
      fileSystems."/boot/efi" = {
        device = "/dev/disk/by-uuid/099A-D668";
        fsType = "vfat";
        options = ["fmask=0022" "dmask=0022"];
      };

      # swap
      swapDevices = [];
    }
  ];
}