From 08297376a85a1719518507e54fca9de954d2376a Mon Sep 17 00:00:00 2001 From: Petri Hienonen Date: Thu, 23 May 2024 13:56:00 +0300 Subject: Agenix configuration --- hosts/saarni/hardware-configuration.nix | 81 +++++++++++++++++++++++---------- 1 file changed, 58 insertions(+), 23 deletions(-) (limited to 'hosts/saarni/hardware-configuration.nix') diff --git a/hosts/saarni/hardware-configuration.nix b/hosts/saarni/hardware-configuration.nix index 6aef572..798aa7b 100644 --- a/hosts/saarni/hardware-configuration.nix +++ b/hosts/saarni/hardware-configuration.nix @@ -1,37 +1,72 @@ # Do not modify this file! It was generated by ‘nixos-generate-config’ # and may be overwritten by future invocations. Please make changes # to /etc/nixos/configuration.nix instead. -{ config, lib, pkgs, modulesPath, ... }: - { - imports = - [ (modulesPath + "/installer/scan/not-detected.nix") ]; + config, + lib, + pkgs, + modulesPath, + ... +}: - boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-intel" ]; - boot.extraModulePackages = [ ]; +{ + imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; - fileSystems."/" = - { device = "/dev/disk/by-uuid/3968a07a-5e37-4bdb-9e3a-6c74950fd03d"; - fsType = "ext4"; + boot = { + kernelPackages = pkgs.linuxPackages_zen; + initrd = { + availableKernelModules = [ + "xhci_pci" + "thunderbolt" + "nvme" + "usb_storage" + "sd_mod" + "i915" + "cdc_acm" + ]; }; + kernelModules = [ + "kvm-intel" + "iwlwifi" + "iwldvm" + "snd_hda_intel" + "snd_soc_avs" + "snd_sof_pci_intel_tgl" + "tcp_bbr" + ]; + extraModulePackages = [ ]; + kernelParams = [ + "default_hugepagesz=2M" + "i915.enable_guc=3" + "i915.fastboot=1" + "mitigations=off" + "nospectre_v2" + "snd-intel-dspcfg.dsp_driver=3" + "transparent_hugepage=always" + "usbcore.blinkenlights=1" + ]; + extraModprobeConfig = '' + options snd_hda_intel enable=0,1 + ''; + }; - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/9B7E-3D1B"; - fsType = "vfat"; - options = [ "fmask=0022" "dmask=0022" ]; - }; + fileSystems."/" = { + device = "/dev/disk/by-uuid/3968a07a-5e37-4bdb-9e3a-6c74950fd03d"; + fsType = "ext4"; + }; - swapDevices = [ ]; + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/9B7E-3D1B"; + fsType = "vfat"; + options = [ + "fmask=0022" + "dmask=0022" + ]; + }; - # 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.wlan0.useDHCP = lib.mkDefault true; + hardware.firmware = [ pkgs.sof-firmware ]; + swapDevices = [ ]; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; } -- cgit v1.3-1-g0d28