about summary refs log tree commit diff
path: root/modules/hardware/t100ha/default.nix
blob: 7cc9c16e6c21092e7771c50af06d8dbbe70398b6 (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
{ config, pkgs, lib, ... }:

let
  cfg = config.vuizvui.hardware.t100ha;
  desc = "hardware support for the ASUS T100HA convertible";

in {
  options.vuizvui.hardware.t100ha.enable = lib.mkEnableOption desc;

  config = lib.mkIf cfg.enable {
    # Needed for booting from MMC:
    boot.initrd.availableKernelModules = [
      "xhci_pci" "sdhci_acpi" "mmc_block"
    ];

    # It's a CherryTrail SoC, so we want to have the latest and greatest:
    boot.kernelPackages = pkgs.linuxPackages_latest;

    # By default the console is rotated by 90 degrees to the right.
    boot.kernelParams = [ "fbcon=rotate:3" ];
    services.xserver.deviceSection = ''
      Option "monitor-DSI1" "Monitor[0]"
    '';
    services.xserver.monitorSection = ''
      Option "Rotate" "left"
    '';
    services.xserver.videoDriver = "intel";
  };
}