forked from mirrors_public/oddlama_nix-config
chore: automatically get (impure) current system for rekeying.
This commit is contained in:
parent
12d840c7bf
commit
3730ae7cf7
2 changed files with 5 additions and 1 deletions
|
@ -27,7 +27,9 @@
|
|||
extraEncryptionPubkeys
|
||||
;
|
||||
|
||||
forceRekeyOnSystem = "x86_64-linux";
|
||||
# This is technically impure, but intended. We need to rekey on the
|
||||
# current system due to yubikey availability.
|
||||
forceRekeyOnSystem = builtins.extraBuiltins.unsafeCurrentSystem;
|
||||
hostPubkey = let
|
||||
pubkeyPath = ../.. + "/${nodeName}/secrets/host.pub";
|
||||
in
|
||||
|
|
|
@ -29,4 +29,6 @@ in {
|
|||
assert assertMsg (builtins.isPath nixFile) "The file to decrypt must be given as a path to prevent impurity.";
|
||||
assert assertMsg (hasSuffix ".nix.age" nixFile) "The content of the decrypted file must be a nix expression and should therefore end in .nix.age";
|
||||
exec ([./rage-decrypt-and-cache.sh nixFile] ++ identities);
|
||||
# currentSystem
|
||||
unsafeCurrentSystem = exec ["nix" "eval" "--impure" "--expr" "builtins.currentSystem"];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue