From 4de88f623ca22b1b54818a0f20c3958173a4913f Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Thu, 14 Mar 2024 20:52:13 -0600 Subject: [PATCH] [NixOS] Set dpi for strixy-minaj --- .../autorandr/strixy-minaj-240hz-solo/config | 20 +++++++++++++++++++ .../autorandr/strixy-minaj-240hz-solo/setup | 1 + nixos/machines/strixy-minaj.nix | 14 ++++++++----- 3 files changed, 30 insertions(+), 5 deletions(-) create mode 100644 dotfiles/config/autorandr/strixy-minaj-240hz-solo/config create mode 100644 dotfiles/config/autorandr/strixy-minaj-240hz-solo/setup diff --git a/dotfiles/config/autorandr/strixy-minaj-240hz-solo/config b/dotfiles/config/autorandr/strixy-minaj-240hz-solo/config new file mode 100644 index 00000000..075a705b --- /dev/null +++ b/dotfiles/config/autorandr/strixy-minaj-240hz-solo/config @@ -0,0 +1,20 @@ +output DP-0 +off +output DP-1 +off +output HDMI-0 +off +output DP-3 +off +output DP-4 +off +output DP-5 +off +output DP-6 +off +output DP-2 +crtc 0 +mode 2560x1600 +pos 0x0 +rate 240.00 +x-prop-non_desktop 0 diff --git a/dotfiles/config/autorandr/strixy-minaj-240hz-solo/setup b/dotfiles/config/autorandr/strixy-minaj-240hz-solo/setup new file mode 100644 index 00000000..2b2a7ee8 --- /dev/null +++ b/dotfiles/config/autorandr/strixy-minaj-240hz-solo/setup @@ -0,0 +1 @@ +DP-2 00ffffffffffff0009e5580c0000000001210104b527187803bbc5ae503fb7250c515500000001010101010101010101010101010101c07200a0a040c8603020360084f21000001a000000fd0c30f0b1b176010a202020202020000000fe00424f452043510a202020202020000000fc004e4531383051444d2d4e4d310a029602030f00e3058080e606050195731000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000fa702079020021001d280f7409000a400680dd2a511824b249120e023554b060ec64662a1378220014ffed1185ff099f002f001f003f06c700020005002b000c27003cef00002700303b0000810015741a0000030b30f0006095107310f0000000008d00000000000000000000000000000000000000000000000000000000bc90 diff --git a/nixos/machines/strixy-minaj.nix b/nixos/machines/strixy-minaj.nix index ca9d8723..b9eff65e 100644 --- a/nixos/machines/strixy-minaj.nix +++ b/nixos/machines/strixy-minaj.nix @@ -22,23 +22,27 @@ android-studio ]; + services.xserver.dpi = 96; boot.kernelPackages = pkgs.linuxPackages_latest; boot.initrd.availableKernelModules = [ "vmd" "xhci_pci" "thunderbolt" "nvme" "usbhid" "usb_storage" "sd_mod" ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; services.xserver = { - videoDrivers = [ "intel" ]; + videoDrivers = [ "nvidia" ]; }; + hardware.opengl = { + enable = true; + driSupport = true; + driSupport32Bit = true; + }; + hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.production; + hardware.nvidia.modesetting.enable = true; boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; services.asusd.enable = true; - # hardware.opengl.extraPackages = [ pkgs.linuxPackages.nvidia_x11.out ]; - # hardware.opengl.extraPackages32 = [ pkgs.linuxPackages.nvidia_x11.lib32 ]; - # hardware.nvidia.modesetting.enable = true; - fileSystems."/" = { device = "/dev/disk/by-uuid/fc06a54c-cc45-423a-914b-8dfcb5939106"; fsType = "ext4";