Compare commits
2 commits
0d8747b39d
...
5e9e4dbdd0
Author | SHA1 | Date | |
---|---|---|---|
5e9e4dbdd0 | |||
ed6cd33144 |
3 changed files with 2 additions and 17 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
# use nix-build -E (import <system>/misc/wg-client-conf.nix {})
|
||||||
{ pkgs ? import <nixpkgs> { }
|
{ pkgs ? import <nixpkgs> { }
|
||||||
, address
|
, address
|
||||||
, privateKey
|
, privateKey
|
||||||
|
|
|
@ -91,8 +91,6 @@ in
|
||||||
config = { pkgs, ... }: {
|
config = { pkgs, ... }: {
|
||||||
system.stateVersion = "23.11";
|
system.stateVersion = "23.11";
|
||||||
|
|
||||||
networking.hosts = config.networking.hosts;
|
|
||||||
|
|
||||||
services.openssh = {
|
services.openssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings.PasswordAuthentication = true;
|
settings.PasswordAuthentication = true;
|
||||||
|
|
16
notes/vpn.md
16
notes/vpn.md
|
@ -1,6 +1,6 @@
|
||||||
# WireGuard
|
# WireGuard
|
||||||
|
|
||||||
## Generate key pair
|
## Generate keypair
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
umask 077
|
umask 077
|
||||||
|
@ -8,20 +8,6 @@ wg genkey > ./private
|
||||||
wg pubkey < ./private > ./public
|
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:
|
# References:
|
||||||
|
|
||||||
- https://nixos.wiki/wiki/WireGuard
|
- https://nixos.wiki/wiki/WireGuard
|
||||||
|
|
Loading…
Reference in a new issue