~ruther/nixos-config

c50153912702938bf5f677abb25d95310a601f68 — Frantisek Bohacek 1 year, 4 months ago cbbf3a0
feat: add luks keyFile with fallback to password
1 files changed, 6 insertions(+), 2 deletions(-)

M hosts/laptop-phobos/default.nix
M hosts/laptop-phobos/default.nix => hosts/laptop-phobos/default.nix +6 -2
@@ 45,11 45,15 @@
      timeout = 1;                          # Grub auto select time
    };

    initrd.systemd.enable = true;
    initrd.luks.devices = {
      "crypted-linux-root" = {
        device = "/dev/disk/by-label/crypted-linux-root";
        preLVM = true;
        # allowDiscards = true;
        allowDiscards = true;

        keyFileSize = 256;
        keyFile = "/dev/disk/by-id/usb-VendorCo_ProductCode_92073160DC061126104-0:0";
        keyFileTimeout = 5;
      };
    };
  };

Do not follow this link