15 lines
455 B
Nix
15 lines
455 B
Nix
{ config, outputs, ... }: {
|
|
virtualisation.oci-containers.containers."wireguard" = {
|
|
image = "weejewel/wg-easy";
|
|
environment = { WG_HOST = "wg.lanakk.com"; };
|
|
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"
|
|
];
|
|
};
|
|
}
|