summaryrefslogtreecommitdiff
path: root/hosts/tomato/hardware.nix
blob: 7fdb646b258ecab907e9bdd48cf8a396c3be84d0 (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
{ pkgs, ... }:

let swapPart = "/dev/sda2";
in
{
  boot.initrd.availableKernelModules = [];
  boot.initrd.kernelModules = [];
  boot.kernelModules = [
    "kvm-intel"
    "uinput"  # work around rules bug
    "iwlwifi"
  ];
  boot.extraModulePackages = [];
  boot.resumeDevice = swapPart;

  boot.loader.grub.enable = true;
  boot.loader.grub.device = "/dev/sda";

  fileSystems."/" = {
    device = "/dev/sda1";
    fsType = "ext4";
  };

  fileSystems."/home" = {
    device = "/dev/sda3";
    fsType = "ext4";
  };

  swapDevices = [
    { device = swapPart; }
  ];

  hardware.graphics.extraPackages = [pkgs.intel-vaapi-driver];
  services.xserver.videoDrivers = ["intel"];

  this.bluetooth.enable = true;

  hardware.firmware = with pkgs; [
    linux-firmware
    broadcom-bt-firmware
  ];

  nixpkgs.hostPlatform = "x86_64-linux";
}