Made wireguard work: 10.0.0.1 accessible
This commit is contained in:
6
flake.lock
generated
6
flake.lock
generated
@@ -2,11 +2,11 @@
|
|||||||
"nodes": {
|
"nodes": {
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1767892417,
|
"lastModified": 1768127708,
|
||||||
"narHash": "sha256-dhhvQY67aboBk8b0/u0XB6vwHdgbROZT3fJAjyNh5Ww=",
|
"narHash": "sha256-1Sm77VfZh3mU0F5OqKABNLWxOuDeHIlcFjsXeeiPazs=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "3497aa5c9457a9d88d71fa93a4a8368816fbeeba",
|
"rev": "ffbc9f8cbaacfb331b6017d5a5abb21a492c9a38",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
@@ -20,8 +20,6 @@
|
|||||||
# Modules
|
# Modules
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.ssh.startAgent = true;
|
|
||||||
|
|
||||||
users.users.user.shell = pkgs.bash;
|
users.users.user.shell = pkgs.bash;
|
||||||
users.users.user = {
|
users.users.user = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
|
|||||||
@@ -3,7 +3,18 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
environment.systemPackages = with pkgs; [
|
networking.wireguard.interfaces = {
|
||||||
wireguard-tools
|
wg0 = {
|
||||||
];
|
ips = [ "10.0.0.3/32" ];
|
||||||
|
listenPort = 5553;
|
||||||
|
privateKeyFile = "/etc/wireguard/wg0.key";
|
||||||
|
peers = [
|
||||||
|
{ # cloudhaus
|
||||||
|
publicKey = "SOqdU6uku2t0l8lGBDEnwDNHrb5Nk/64qA6++mGa+CI=";
|
||||||
|
allowedIPs = [ "10.0.0.1/32"];
|
||||||
|
endpoint = "46.62.255.194:51820";
|
||||||
|
persistentKeepalive = 25;
|
||||||
|
}];
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user