add fido2 protocol for unlocking luks

This commit is contained in:
ulic-youthlic 2025-02-23 22:49:58 +08:00
parent 5b00dac090
commit 46cc773eaa
Signed by: youthlic
GPG key ID: 63E86C3C14A0D721
2 changed files with 13 additions and 3 deletions

View file

@ -96,6 +96,7 @@
kernelPackages = pkgs.linuxPackages_zen;
loader.systemd-boot.enable = true;
loader.efi.canTouchEfiVariables = true;
initrd.systemd.enable = true;
};
# This value determines the NixOS release from which the default

View file

@ -30,7 +30,10 @@
passwordFile = "/tmp/secret.key";
settings = {
allowDiscards = true;
fallbackToPassword = true;
crypttabExtraOpts = [
"fido2-device=auto"
"token-timeout=10"
];
};
content = {
type = "swap";
@ -59,7 +62,10 @@
passwordFile = "/tmp/secret.key";
settings = {
allowDiscards = true;
fallbackToPassword = true;
crypttabExtraOpts = [
"fido2-device=auto"
"token-timeout=10"
];
};
initrdUnlock = true;
extraFormatArgs = [
@ -93,7 +99,10 @@
passwordFile = "/tmp/secret.key";
settings = {
allowDiscards = true;
fallbackToPassword = true;
crypttabExtraOpts = [
"fido2-device=auto"
"token-timeout=10"
];
};
initrdUnlock = true;
extraFormatArgs = [