nix-config/nixos/_mixins/filesystems/encrypted-root.nix

8 lines
170 B
Nix

{ config, ... }:
let hostname = config.networking.hostName;
in {
boot.initrd = {
luks.devices."${hostname}".device = "/dev/disk/by-label/${hostname}_crypt";
};
}