2023-02-08 13:59:00 +00:00
|
|
|
{ config, outputs, ... }: {
|
|
|
|
virtualisation.oci-containers.containers."wireguard" = {
|
|
|
|
image = "weejewel/wg-easy";
|
2023-02-11 21:12:55 +00:00
|
|
|
environment = { WG_HOST = "wg.lanakk.com"; WG_DEFAULT_DNS = "10.88.0.1"; };
|
2023-02-08 13:59:00 +00:00
|
|
|
ports = [ "3007:51821/tcp" "51820:51820/udp" ];
|
|
|
|
volumes = [ "wireguard_data:/etc/wireguard" ];
|
|
|
|
extraOptions = [
|
|
|
|
"--cap-add=NET_ADMIN"
|
|
|
|
"--cap-add=SYS_MODULE"
|
|
|
|
"--sysctl=net.ipv4.conf.all.src_valid_mark=1"
|
|
|
|
"--sysctl=net.ipv4.ip_forward=1"
|
2023-02-13 16:09:49 +00:00
|
|
|
"--ip=10.88.0.17"
|
2023-02-08 13:59:00 +00:00
|
|
|
];
|
|
|
|
};
|
|
|
|
}
|