petalius: add wireguard
This commit is contained in:
parent
e779620861
commit
ea718b3967
@ -35,6 +35,7 @@
|
|||||||
ctags
|
ctags
|
||||||
nix-prefetch-scripts
|
nix-prefetch-scripts
|
||||||
(pkgs.nix-repl or pkgs.nix)
|
(pkgs.nix-repl or pkgs.nix)
|
||||||
|
(pkgs.wireguard or pkgs.hello)
|
||||||
jq
|
jq
|
||||||
];
|
];
|
||||||
|
|
||||||
|
12
petalius.nix
12
petalius.nix
@ -89,4 +89,16 @@
|
|||||||
|
|
||||||
system.stateVersion = "18.03";
|
system.stateVersion = "18.03";
|
||||||
|
|
||||||
|
networking.wireguard.interfaces.wg0 = {
|
||||||
|
ips = ["10.59.0.2/16"];
|
||||||
|
privateKeyFile = "/etc/wgkeys/petalius";
|
||||||
|
allowedIPsAsRoutes = true;
|
||||||
|
peers = [{
|
||||||
|
publicKey = "ByLlJbevlTBooAo2RIZGGJvBHKqA9qiOpHBvR5yuJX4=";
|
||||||
|
allowedIPs = ["10.56.0.0/14" "10.60.1.1"];
|
||||||
|
endpoint = "mtlaa-gw.gebner.org:35869";
|
||||||
|
}];
|
||||||
|
};
|
||||||
|
systemd.services.wireguard-wg0.wantedBy = pkgs.lib.mkOverride 10 [];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user