createKeys option
This commit is contained in:
parent
850f273222
commit
2fb1d3dad4
|
@ -21,6 +21,7 @@ in
|
||||||
enable = mkEnableOption "Enable the LANZABOOTE";
|
enable = mkEnableOption "Enable the LANZABOOTE";
|
||||||
|
|
||||||
enrollKeys = mkEnableOption "Automatic enrollment of the keys using sbctl";
|
enrollKeys = mkEnableOption "Automatic enrollment of the keys using sbctl";
|
||||||
|
createKeys = mkEnableOption "Automatic creation of the keys using sbctl";
|
||||||
|
|
||||||
configurationLimit = mkOption {
|
configurationLimit = mkOption {
|
||||||
default = config.boot.loader.systemd-boot.configurationLimit;
|
default = config.boot.loader.systemd-boot.configurationLimit;
|
||||||
|
@ -110,6 +111,10 @@ in
|
||||||
boot.loader.external = {
|
boot.loader.external = {
|
||||||
enable = true;
|
enable = true;
|
||||||
installHook = pkgs.writeShellScript "bootinstall" ''
|
installHook = pkgs.writeShellScript "bootinstall" ''
|
||||||
|
${optionalString cfg.createKeys ''
|
||||||
|
${pkgs.sbctl}/bin/sbctl create-keys
|
||||||
|
''}
|
||||||
|
|
||||||
${optionalString cfg.enrollKeys ''
|
${optionalString cfg.enrollKeys ''
|
||||||
mkdir -p /tmp/pki
|
mkdir -p /tmp/pki
|
||||||
cp -r ${cfg.pkiBundle}/* /tmp/pki
|
cp -r ${cfg.pkiBundle}/* /tmp/pki
|
||||||
|
|
Loading…
Reference in New Issue