diff --git a/hardware/p8-laptop.nix b/hardware/p8-laptop.nix new file mode 100644 index 0000000..c6aa91c --- /dev/null +++ b/hardware/p8-laptop.nix @@ -0,0 +1,30 @@ +{ config, lib, pkgs, ... }: + +{ + # Add Intel UHD vaapi support + imports = [ + ./intel-uhd.nix + ]; + + # Fix on boot framebuffer res and rotation + boot.kernelParams = + [ + "video=efifb:mode=0" + "fbcon=rotate:1" + ]; + boot.kernelPackages = pkgs.linuxPackages_latest; + + # Provide rotation to X/Wayland + services.xserver.xrandrHeads = + [ + { + output = "DSI-1"; + primary = true; + monitorConfig = '' + Option "Rotate" "left" + ''; + } + ]; +} + + diff --git a/machines/talos/configuration.nix b/machines/talos/configuration.nix index 13adb1b..c30c877 100644 --- a/machines/talos/configuration.nix +++ b/machines/talos/configuration.nix @@ -4,8 +4,8 @@ imports = [ # Include the results of the hardware scan. ./hardware-configuration.nix + ../../hardware/p8-laptop.nix ../../common.nix - ../../hardware/intel-uhd.nix ]; system.copySystemConfiguration = true; @@ -14,12 +14,6 @@ # Use the systemd-boot EFI boot loader. boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; - boot.kernelParams = - [ - "video=efifb:mode=0" - "fbcon=rotate:1" - ]; - boot.kernelPackages = pkgs.linuxPackages_latest; networking.hostName = "talos"; networking.networkmanager.enable = true; @@ -32,16 +26,6 @@ services.xserver.desktopManager.gnome.enable = true; services.xserver.xkb.layout = "us"; services.xserver.libinput.enable = true; - services.xserver.xrandrHeads = - [ - { - output = "DSI-1"; - primary = true; - monitorConfig = '' - Option "Rotate" "left" - ''; - } - ]; # Enable sound. sound.enable = true;