summaryrefslogtreecommitdiffstats
path: root/makefu/1systems/omo/hw/tsp.nix
blob: 99c558056207b0b32c7c85b772b9f2e3e65b2093 (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
{ pkgs, ... }:
with builtins;
let
  disko = import (builtins.fetchGit {
    url = https://cgit.lassul.us/disko/;
    rev = "9c9b62e15e4ac11d4379e66b974f1389daf939fe";
  });
  cfg = fromJSON (readFile ../../hardware/tsp-disk.json);
  primaryInterface = "enp1s0";
  rootDisk = "/dev/sda"; # TODO same as disko uses
in {
  imports = [
    (disko.config cfg)
  ];
  makefu.server.primary-itf = primaryInterface;
  boot = {
    loader.grub.device = rootDisk;

    initrd.availableKernelModules = [
      "ahci"
      "ohci_pci"
      "ehci_pci"
      "pata_atiixp"
      "firewire_ohci"
      "usb_storage"
      "usbhid"
    ];

    kernelModules = [ "kvm-intel" ];
  };
  networking.wireless.enable = true;
  hardware.enableRedistributableFirmware = true;
  hardware.cpu.intel.updateMicrocode = true;
  services.logind.lidSwitch = "ignore";
  services.logind.lidSwitchDocked = "ignore";
  services.logind.extraConfig = ''
    HandleSuspendKey = ignore
  '';
  powerManagement.enable = false;
}