Skip to content

Instantly share code, notes, and snippets.

@msteen
Created January 16, 2019 23:57
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save msteen/a4da712fa88cdd363b91a8825c91cef4 to your computer and use it in GitHub Desktop.
Save msteen/a4da712fa88cdd363b91a8825c91cef4 to your computer and use it in GitHub Desktop.
{ 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