From 05136e147b966475dd4cafa06976f02ebc9cffe3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki?= Date: Thu, 5 Jan 2023 23:28:34 +0000 Subject: [PATCH] explicitly pull in firmware where we control boot process --- nixos/boot.nix | 9 ++--- nixos/boxes/yoga/hardware-configuration.nix | 38 ++++++++------------- 2 files changed, 18 insertions(+), 29 deletions(-) diff --git a/nixos/boot.nix b/nixos/boot.nix index 2bfa7dd1..1bfc7292 100644 --- a/nixos/boot.nix +++ b/nixos/boot.nix @@ -1,10 +1,7 @@ -{ - config, - pkgs, - ... -}: { - fileSystems."/".options = ["noatime" "nodiratime" "discard"]; +{ config, pkgs, lib, ... }: { + fileSystems."/".options = [ "noatime" "nodiratime" "discard" ]; + hardware.enableRedistributableFirmware = lib.mkDefault true; boot = { kernel.sysctl = { "max_user_watches" = 524288; diff --git a/nixos/boxes/yoga/hardware-configuration.nix b/nixos/boxes/yoga/hardware-configuration.nix index 87e6e1d8..f1c24611 100644 --- a/nixos/boxes/yoga/hardware-configuration.nix +++ b/nixos/boxes/yoga/hardware-configuration.nix @@ -1,15 +1,8 @@ -{ - config, - lib, - pkgs, - modulesPath, - ... -}: { - imports = - [ (modulesPath + "/installer/scan/not-detected.nix") - ]; +{ config, lib, pkgs, modulesPath, ... }: { + imports = [ ]; - boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; + boot.initrd.availableKernelModules = + [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; @@ -19,21 +12,20 @@ boot.loader.efi.efiSysMountPoint = "/boot/efi"; # Setup keyfile - boot.initrd.secrets = { - "/crypto_keyfile.bin" = null; + boot.initrd.secrets = { "/crypto_keyfile.bin" = null; }; + fileSystems."/" = { + device = "/dev/disk/by-uuid/a43a1c42-9166-47dc-9e78-20e0975c75c5"; + fsType = "btrfs"; + options = [ "subvol=@" ]; }; - fileSystems."/" = - { device = "/dev/disk/by-uuid/a43a1c42-9166-47dc-9e78-20e0975c75c5"; - fsType = "btrfs"; - options = [ "subvol=@" ]; - }; - boot.initrd.luks.devices."luks-99498047-118a-484a-8c2a-987ca68d4943".device = "/dev/disk/by-uuid/99498047-118a-484a-8c2a-987ca68d4943"; + boot.initrd.luks.devices."luks-99498047-118a-484a-8c2a-987ca68d4943".device = + "/dev/disk/by-uuid/99498047-118a-484a-8c2a-987ca68d4943"; - fileSystems."/boot/efi" = - { device = "/dev/disk/by-uuid/F179-A4EA"; - fsType = "vfat"; - }; + fileSystems."/boot/efi" = { + device = "/dev/disk/by-uuid/F179-A4EA"; + fsType = "vfat"; + }; swapDevices = [ ];