Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
{ config, lib, ... }:
with lib;
{
# Add support for Grub secrets
config = mkIf (config.boot.loader.grub.enable && config.boot.initrd.secrets != {}) {
boot.loader = {
supportsInitrdSecrets = mkForce true;
grub.extraInitrd = "/boot/grub/secrets-initrd.gz";
grub.extraPrepareConfig = ''
${config.system.build.initialRamdiskSecretAppender}/bin/append-initrd-secrets /boot/grub/secrets-initrd.gz
'';
};
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.