From fc21e4193c5d2675e7c4f2fd297041cafe0af271 Mon Sep 17 00:00:00 2001 From: foosinn Date: Sun, 30 Aug 2020 12:40:06 +0200 Subject: [PATCH] per hardware symlinks --- .gitignore | 1 + configuration.nix | 9 ------ .../x360-raven.nix | 32 ++++++++++++++++--- 3 files changed, 29 insertions(+), 13 deletions(-) rename hardware-configuration.nix => hardware/x360-raven.nix (51%) diff --git a/.gitignore b/.gitignore index 59d0e90..65d0dbf 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /result /roles/wireless.nix +hardware-configuration.nix diff --git a/configuration.nix b/configuration.nix index eae589f..bb81af7 100644 --- a/configuration.nix +++ b/configuration.nix @@ -18,16 +18,7 @@ ./roles/vpn.nix ]; - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; - boot.kernelPackages = pkgs.linuxPackages_latest; - - networking.hostName = "raven"; - networking.hostId = "e3a397c5"; - networking.useDHCP = false; - networking.interfaces.wlo1.useDHCP = true; - networking.resolvconf.useLocalResolver = true; i18n.defaultLocale = "en_US.UTF-8"; time.timeZone = "Europe/Berlin"; diff --git a/hardware-configuration.nix b/hardware/x360-raven.nix similarity index 51% rename from hardware-configuration.nix rename to hardware/x360-raven.nix index 1eeab35..d621f08 100644 --- a/hardware-configuration.nix +++ b/hardware/x360-raven.nix @@ -7,14 +7,38 @@ imports = [ - - + + ]; - boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; + services.tlp.enable = true; + systemd.tmpfiles.rules = [ + "w /sys/class/drm/card0/device/power_dpm_force_performance_level - - - - low" + ]; + + boot.initrd.availableKernelModules = [ + "nvme" + "xhci_pci" + "ahci" + "usb_storage" + "sd_mod" + "rtsx_pci_sdmmc" + ]; boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-amd" ]; boot.extraModulePackages = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.kernelParams = [ "amdgpu.dpm=1" ]; + boot.kernelPackages = pkgs.linuxPackages_latest; + + + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + networking.hostName = "raven"; + networking.hostId = "e3a397c5"; + + networking.interfaces.wlo1.useDHCP = true; + networking.resolvconf.useLocalResolver = true; fileSystems."/" = { device = "tank/root/nixos";