dumpyourvms: core: use linuxPackages_6_1 and add

check for kernel version for WiFi kernel module pre-sleep + post-sleep
hook
This commit is contained in:
teutat3s 2023-04-26 12:54:38 +02:00
parent 8f0790b6fd
commit e7b03b9770
Signed by: teutat3s
GPG key ID: 4FA1D3FA524F22C1
2 changed files with 7 additions and 3 deletions

View file

@ -135,8 +135,12 @@ in {
# brcmfmac being loaded during hibernation would inhibit a successful resume
# https://bugzilla.kernel.org/show_bug.cgi?id=101681#c116.
# Also brcmfmac could randomly crash on resume from sleep.
powerUpCommands = lib.mkBefore "${pkgs.kmod}/bin/modprobe brcmfmac_wcc brcmfmac";
powerDownCommands = lib.mkBefore "${pkgs.kmod}/bin/rmmod brcmfmac_wcc brcmfmac";
powerUpCommands = lib.mkBefore ("${pkgs.kmod}/bin/modprobe brcmfmac"
+ lib.optionalString
(lib.versionAtLeast config.boot.kernelPackages.kernel.version "6.2") " brcmfmac_wcc");
powerDownCommands = lib.mkBefore ("${pkgs.kmod}/bin/rmmod brcmfmac"
+ lib.optionalString
(lib.versionAtLeast config.boot.kernelPackages.kernel.version "6.2") " brcmfmac_wcc");
};
# Change lid switch behaviour

View file

@ -36,7 +36,7 @@ in {
loader.systemd-boot.enable = lib.mkDefault true;
# Use latest linux kernel by default
kernelPackages = lib.mkDefault pkgs.linuxPackages_6_2;
kernelPackages = lib.mkDefault pkgs.linuxPackages_6_1;
# Support ntfs drives
supportedFilesystems = ["ntfs"];