forked from mirrors_public/oddlama_nix-config
feat: allow .nix.age files to contain functions or bare attrs
This commit is contained in:
parent
5bf0935eb2
commit
3111408f7d
6 changed files with 37 additions and 30 deletions
|
@ -22,7 +22,7 @@
|
|||
in
|
||||
lenContent >= lenSuffix && builtins.substring (lenContent - lenSuffix) lenContent content == suffix;
|
||||
in {
|
||||
rageImportDecrypt = identities: nixFile:
|
||||
rageImportEncrypted = identities: nixFile:
|
||||
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" "-d"] ++ (builtins.concatMap (x: ["-i" x]) identities) ++ [nixFile]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue