mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2025-12-06 00:57:22 +01:00
feat: repo-local secrets implemented for yubikey
This commit is contained in:
parent
609bb1597f
commit
85cbd5e1f6
11 changed files with 230 additions and 60 deletions
|
|
@ -17,8 +17,8 @@ in
|
|||
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";
|
||||
assert assertMsg (hasSuffix ".nix.enc" nixFile)
|
||||
"The content of the decrypted file must be a nix expression and should therefore end in .nix.enc";
|
||||
exec [
|
||||
./sops-decrypt-and-cache.sh
|
||||
nixFile
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ fi
|
|||
file="$1"
|
||||
shift
|
||||
|
||||
basename="$file"
|
||||
basename="${file%".enc"}"
|
||||
# store path prefix or ./ if applicable
|
||||
[[ $file == "/nix/store/"* ]] && basename="${basename#*"-"}"
|
||||
[[ $file == "./"* ]] && basename="${basename#"./"}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue