Skip to content

Instantly share code, notes, and snippets.

@ottidmes
Created December 22, 2018 17:45
Show Gist options
  • Save ottidmes/b5a8758c1d744f56eb9921a9f4084a13 to your computer and use it in GitHub Desktop.
Save ottidmes/b5a8758c1d744f56eb9921a9f4084a13 to your computer and use it in GitHub Desktop.
{
# 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