From 51d7ddb954e297da2f794f318825a63d9a3a01c7 Mon Sep 17 00:00:00 2001 From: Astrid Yu Date: Wed, 11 Oct 2023 22:38:37 -0700 Subject: [PATCH] Drop VFIO x11 customizations --- machines/chungus/configuration.nix | 1 - machines/chungus/x11.nix | 38 --------------- machines/chungus/xorg.conf | 77 ------------------------------ 3 files changed, 116 deletions(-) delete mode 100644 machines/chungus/x11.nix delete mode 100644 machines/chungus/xorg.conf diff --git a/machines/chungus/configuration.nix b/machines/chungus/configuration.nix index ba4c9b95..0b838325 100644 --- a/machines/chungus/configuration.nix +++ b/machines/chungus/configuration.nix @@ -3,7 +3,6 @@ inputs: with lib; { imports = [ ./hardware-configuration.nix - ./x11.nix "${inputs.nixos-hardware}/common/cpu/amd" inputs.self.nixosModules.pc ]; diff --git a/machines/chungus/x11.nix b/machines/chungus/x11.nix deleted file mode 100644 index 3fd66d47..00000000 --- a/machines/chungus/x11.nix +++ /dev/null @@ -1,38 +0,0 @@ -{ pkgs, lib, config, ... }: -with lib; let - cfg = config.services.xserver; - - outputConfig = builtins.readFile ./xorg.conf; - - # This is lifted from the nixpkgs xserver module. - prefixStringLines = prefix: str: - concatMapStringsSep "\n" (line: prefix + line) (splitString "\n" str); - indent = prefixStringLines "\t"; - preConfig = '' - Section "ServerFlags" - Option "AllowMouseOpenFail" "on" - Option "DontZap" "${if cfg.enableCtrlAltBackspace then "off" else "on"}" - ${indent cfg.serverFlagsSection} - EndSection - - Section "Module" - ${indent cfg.moduleSection} - EndSection - - # Additional "InputClass" sections - ${flip (concatMapStringsSep "\n") cfg.inputClassSections - (inputClassSection: '' - Section "InputClass" - ${indent inputClassSection} - EndSection - '')} - ''; -in { - services.xserver = { - videoDrivers = [ "modesetting" "nvidia" ]; - moduleSection = '' - Load "glx" - ''; - config = mkForce (concatStringsSep "\n" [ preConfig outputConfig ]); - }; -} diff --git a/machines/chungus/xorg.conf b/machines/chungus/xorg.conf deleted file mode 100644 index 16a1677a..00000000 --- a/machines/chungus/xorg.conf +++ /dev/null @@ -1,77 +0,0 @@ -# Advanced configuration for displays -Section "ServerLayout" - Identifier "full" - Screen 0 "ScreenAsus" 0 0 - Screen 1 "ScreenVTK-BigGPU" RightOf "ScreenAsus" - InputDevice "Mouse0" "CorePointer" - InputDevice "Keyboard0" "CoreKeyboard" -EndSection - -Section "ServerLayout" - Identifier "side" - Screen 0 "ScreenVTK" 0 0 - InputDevice "Mouse0" "CorePointer" - InputDevice "Keyboard0" "CoreKeyboard" -EndSection - -Section "InputDevice" - Identifier "Keyboard0" - Driver "kbd" -EndSection - -Section "InputDevice" - Identifier "Mouse0" - Driver "mouse" - Option "Protocol" "auto" - Option "Device" "/dev/input/mice" - Option "ZAxisMapping" "4 5 6 7" -EndSection - -Section "Monitor" - # HorizSync source: edid, VertRefresh source: edid - Identifier "MonitorAsus" - VendorName "Unknown" - ModelName "AUS ASUS VP28U" - HorizSync 24.0 - 160.0 - VertRefresh 23.0 - 80.0 - Option "DPMS" - Option "Primary" "true" -EndSection - -Section "Monitor" - # HorizSync source: edid, VertRefresh source: edid - Identifier "MonitorVTK" - VendorName "Unknown" - ModelName "VTK FI24D" - HorizSync 74.0 - 111.0 - VertRefresh 48.0 - 60.0 - Option "DPMS" -EndSection - -Section "Device" - Identifier "CardBig" - Driver "nvidia" - VendorName "NVIDIA Corporation" - BoardName "NVIDIA GeForce RTX 3070 Ti" - Option "RenderAccel" "true" - BusID "PCI:6:0:0" -EndSection - -Section "Screen" - Identifier "ScreenVTK-BigGPU" - Device "CardBig" - Monitor "MonitorVTK" - SubSection "Display" - Depth 24 - EndSubSection -EndSection - -Section "Screen" - Identifier "ScreenAsus" - Device "CardBig" - Monitor "MonitorAsus" - SubSection "Display" - Depth 24 - EndSubSection -EndSection -