2022-10-16 09:58:11 +00:00
|
|
|
#!/usr/bin/env ./sshtool
|
|
|
|
|
2022-11-03 18:25:28 +00:00
|
|
|
cmd 'nix-env -i wireguard-tools'
|
2022-10-16 09:58:11 +00:00
|
|
|
cmd 'mkdir -p /var/lib/deuxfleurs/wireguard-keys'
|
|
|
|
cmd 'test -f /var/lib/deuxfleurs/wireguard-keys/private || (wg genkey > /var/lib/deuxfleurs/wireguard-keys/private; chmod 600 /var/lib/deuxfleurs/wireguard-keys/private)'
|
|
|
|
cmd 'echo "Public key: $(wg pubkey < /var/lib/deuxfleurs/wireguard-keys/private)"'
|