stuff
This commit is contained in:
parent
5a65308798
commit
ed3b006970
7 changed files with 179 additions and 56 deletions
|
@ -1,12 +1,24 @@
|
|||
{self, attrName, config, lib, pkgs, ...}: let
|
||||
{
|
||||
self,
|
||||
attrName,
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (config.age) secrets;
|
||||
in{
|
||||
in
|
||||
{
|
||||
age.secrets.secure-boot.file = self + /secrets/secure-boot/${attrName}.tar.age;
|
||||
|
||||
system.activationScripts.secureboot = let
|
||||
target = config.boot.lanzaboote.pkiBundle;
|
||||
in ''
|
||||
mkdir --parents ${target}
|
||||
${lib.getExe pkgs.gnutar} --extract --file ${secrets.secure-boot.path} --directory ${target}
|
||||
'';
|
||||
system.activationScripts.secureboot =
|
||||
let
|
||||
target = config.boot.lanzaboote.pkiBundle;
|
||||
in
|
||||
''
|
||||
rm --recursive --force -- ${lib.escapeShellArg target}
|
||||
mkdir --parents -- ${lib.escapeShellArg target}
|
||||
${lib.getExe pkgs.gnutar} --extract --file ${lib.escapeShellArg secrets.secure-boot.path} --directory ${lib.escapeShellArg target}
|
||||
'';
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue