From 521937e36609d74b33be99e3b89d49165ea3a2ac Mon Sep 17 00:00:00 2001 From: Noah Masur <7386960+nmasur@users.noreply.github.com> Date: Tue, 31 Jan 2023 09:07:47 -0500 Subject: [PATCH] fix desktop for new pc build --- hosts/desktop/hardware-configuration.nix | 36 +++++++++++++++--------- nixos/hardware/monitors.nix | 4 +-- nixos/hardware/networking.nix | 4 +-- 3 files changed, 26 insertions(+), 18 deletions(-) diff --git a/hosts/desktop/hardware-configuration.nix b/hosts/desktop/hardware-configuration.nix index af59134..e4e7a0b 100644 --- a/hosts/desktop/hardware-configuration.nix +++ b/hosts/desktop/hardware-configuration.nix @@ -4,27 +4,35 @@ { config, lib, pkgs, modulesPath, ... }: { - imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; - boot.initrd.availableKernelModules = - [ "xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod" ]; + boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ]; boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-intel" ]; + boot.kernelModules = [ "kvm-amd" ]; boot.extraModulePackages = [ ]; - fileSystems."/" = { - device = "/dev/disk/by-label/nixos"; - fsType = "ext4"; - }; + fileSystems."/" = + { device = "/dev/disk/by-uuid/f0313f58-971a-46e3-9191-909fe5eb7f7e"; + fsType = "ext4"; + }; - fileSystems."/boot" = { - device = "/dev/disk/by-label/boot"; - fsType = "vfat"; - }; + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/FB26-799C"; + fsType = "vfat"; + }; swapDevices = [ ]; + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp5s0.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp4s0.useDHCP = lib.mkDefault true; + powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; - hardware.cpu.intel.updateMicrocode = - lib.mkDefault config.hardware.enableRedistributableFirmware; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/nixos/hardware/monitors.nix b/nixos/hardware/monitors.nix index e8cf5b9..e07e448 100644 --- a/nixos/hardware/monitors.nix +++ b/nixos/hardware/monitors.nix @@ -32,11 +32,11 @@ # Set up screen position and rotation setupCommands = '' - ${pkgs.xorg.xrandr}/bin/xrandr --output DisplayPort-0 \ + ${pkgs.xorg.xrandr}/bin/xrandr --output DisplayPort-1 \ --mode 1920x1200 \ --pos 1920x0 \ --rotate left \ - --output HDMI-0 \ + --output HDMI-A-0 \ --primary \ --mode 1920x1080 \ --pos 0x560 \ diff --git a/nixos/hardware/networking.nix b/nixos/hardware/networking.nix index a9017bd..f157de9 100644 --- a/nixos/hardware/networking.nix +++ b/nixos/hardware/networking.nix @@ -6,8 +6,8 @@ # Per-interface useDHCP will be mandatory in the future, so this generated config # replicates the default behaviour. networking.useDHCP = false; - networking.interfaces.enp0s31f6.useDHCP = true; - networking.interfaces.wlp3s0.useDHCP = true; + networking.interfaces.enp5s0.useDHCP = true; + networking.interfaces.wlp4s0.useDHCP = true; };