mirror of
https://github.com/CHN-beta/nixos.git
synced 2026-01-12 00:49:42 +08:00
reset iwlwifi after restore from hibernate
put salt in separate partition
This commit is contained in:
@@ -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";
|
||||
};
|
||||
|
||||
@@ -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" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user