Compare commits
4 commits
5e9e4dbdd0
...
0d8747b39d
Author | SHA1 | Date | |
---|---|---|---|
0d8747b39d | |||
b6ac86a1e5 | |||
4dcbaa3656 | |||
4016eb1b71 |
3 changed files with 17 additions and 2 deletions
|
@ -1,4 +1,3 @@
|
|||
# use nix-build -E (import <system>/misc/wg-client-conf.nix {})
|
||||
{ pkgs ? import <nixpkgs> { }
|
||||
, address
|
||||
, privateKey
|
||||
|
|
|
@ -91,6 +91,8 @@ in
|
|||
config = { pkgs, ... }: {
|
||||
system.stateVersion = "23.11";
|
||||
|
||||
networking.hosts = config.networking.hosts;
|
||||
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings.PasswordAuthentication = true;
|
||||
|
|
16
notes/vpn.md
16
notes/vpn.md
|
@ -1,6 +1,6 @@
|
|||
# WireGuard
|
||||
|
||||
## Generate keypair
|
||||
## Generate key pair
|
||||
|
||||
```sh
|
||||
umask 077
|
||||
|
@ -8,6 +8,20 @@ wg genkey > ./private
|
|||
wg pubkey < ./private > ./public
|
||||
```
|
||||
|
||||
|
||||
## Configuration
|
||||
|
||||
Then create QR code with configuration using the following command:
|
||||
|
||||
```sh
|
||||
nix build -f ./misc/wg-client-conf.nix \
|
||||
--argstr address "" \
|
||||
--argstr dns "" \
|
||||
--argstr privateKey "$(cat private)" \
|
||||
--argstr serverPublicKey "" \
|
||||
--argstr serverEndpoint ""
|
||||
```
|
||||
|
||||
# References:
|
||||
|
||||
- https://nixos.wiki/wiki/WireGuard
|
||||
|
|
Loading…
Reference in a new issue