mirror of
https://github.com/fort-nix/nix-bitcoin.git
synced 2024-11-30 03:32:05 +03:00
20 lines
417 B
Bash
Executable File
20 lines
417 B
Bash
Executable File
#!/bin/bash
|
|
|
|
SECRETSFILE=secrets/secrets.nix
|
|
|
|
if [ -e "$SECRETSFILE" ]; then
|
|
echo $SECRETSFILE already exists
|
|
exit 1
|
|
fi
|
|
|
|
echo Installing apg through nix-env
|
|
nix-env -i apg
|
|
echo Write secrets to $SECRETSFILE
|
|
{
|
|
echo \{
|
|
echo " bitcoinrpcpassword = \"$(apg -m 20 -x 20 -M Ncl -n 1)\";"
|
|
echo " lightning-charge-api-token = \"$(apg -m 20 -x 20 -M Ncl -n 1)\";"
|
|
echo \}
|
|
} >> $SECRETSFILE
|
|
echo Done
|