mirror of
https://github.com/nmasur/dotfiles
synced 2025-07-06 19:00:14 +00:00
move apps into pkgs and rename hosts
This commit is contained in:
11
pkgs/tools/misc/encrypt-secret/package.nix
Normal file
11
pkgs/tools/misc/encrypt-secret/package.nix
Normal file
@ -0,0 +1,11 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
pkgs.writeShellScriptBin "encrypt-secret" ''
|
||||
printf "\nEnter the secret data to encrypt for all hosts...\n\n" 1>&2
|
||||
read -p "Secret: " secret
|
||||
printf "\nEncrypting...\n\n" 1>&2
|
||||
tmpfile=$(mktemp)
|
||||
echo "''${secret}" > ''${tmpfile}
|
||||
${pkgs.age}/bin/age --encrypt --armor --recipients-file ${builtins.toString ../../../../misc/public-keys} $tmpfile
|
||||
rm $tmpfile
|
||||
''
|
Reference in New Issue
Block a user