aboutsummaryrefslogtreecommitdiff
path: root/deploy_wg
blob: 0bef5d629467e12a6366b08122247925ba88aef5 (plain) (blame)
1
2
3
4
5
6
#!/usr/bin/env ./sshtool

cmd 'nix-env -i wireguard-tools'
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)"'