aboutsummaryrefslogtreecommitdiffstats
path: root/hosts/saarni/hardware-configuration.nix
diff options
context:
space:
mode:
authorPetri Hienonen <petri.hienonen@gmail.com>2024-05-23 13:56:00 +0300
committerPetri Hienonen <petri.hienonen@gmail.com>2025-11-30 12:29:57 +0200
commit08297376a85a1719518507e54fca9de954d2376a (patch)
tree3b9c58304b40248533bbb2bb5b7bad2da9da1ff0 /hosts/saarni/hardware-configuration.nix
parent75c2af4aedd2ac5c2cfc74b346625fa4b265541d (diff)
downloadnixos-08297376a85a1719518507e54fca9de954d2376a.tar.zst
Agenix configuration
Diffstat (limited to 'hosts/saarni/hardware-configuration.nix')
-rw-r--r--hosts/saarni/hardware-configuration.nix81
1 files changed, 58 insertions, 23 deletions
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.<interface>.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;
}