reset iwlwifi after restore from hibernate

put salt in separate partition
This commit is contained in:
2023-06-20 00:12:22 +08:00
parent a71766f771
commit 6229ab33d5
2 changed files with 20 additions and 1 deletions

View File

@@ -52,6 +52,8 @@
# mkdir -p /boot/crypt-storage
# echo -ne "$SALT\n$ITERATIONS" > /boot/crypt-storage/default
# echo -n "$LUKS_KEY" | hextorb | cryptsetup open /dev/sdb5 encrypted --key-file=-
# cryptsetup luksOpen --test-passphrase --key-slot 0 /dev/sda2
# cryptsetup luksKillSlot /dev/sdb1 2
yubikeySupport = true;
devices.root =
{
@@ -66,7 +68,7 @@
saltLength = 16;
storage =
{
device = "/dev/disk/by-uuid/02e426ec-cfa2-4a18-b3a5-57ef04d66614";
device = "/dev/disk/by-uuid/631e5af2-af11-464a-9fbc-52f5215ae401";
fsType = "btrfs";
path = "/crypt-storage/default";
};

View File

@@ -1,3 +1,4 @@
{ pkgs, ... }@inputs:
{
config =
{
@@ -5,5 +6,21 @@
services.dbus.implementation = "broker";
programs.dconf.enable = true;
hardware.opengl.enable = true;
systemd.services.reload-iwlwifi-after-hibernate =
{
description = "reload iwlwifi after resume from hibernate";
after = [ "systemd-hibernate.service" ];
serviceConfig =
{
Type = "oneshot";
ExecStart =
[
"${pkgs.kmod}/bin/modprobe -r iwlmvm iwlwifi"
"${pkgs.kmod}/bin/modprobe iwlwifi"
"echo 0 | tee /sys/devices/system/cpu/intel_pstate/no_turbo"
];
};
wantedBy = [ "systemd-hibernate.service" ];
};
};
}