Skip to content

wg-easy

Example

nix
{config, ...}: {
  wg-easy = {
    enable = true;

    adminPasswordFile = config.sops.secrets."wg-easy/admin_password".path;
    extraEnv = {
      DISABLE_IPV6 = true;
    };
  };
}

Stack Options

nps.stacks.wg-easy.adminPasswordFile

Path to the file containing the admin password.

Only has an effect during initial setup. See https://wg-easy.github.io/wg-easy/latest/advanced/config/unattended-setup/

Type
plaintext
absolute path
Declaration

nps.stacks.wg-easy.adminUsername

Admin username.

Only has an effect during initial setup. See https://wg-easy.github.io/wg-easy/latest/advanced/config/unattended-setup/

Type
plaintext
string
Default
nix
"admin"
Declaration

nps.stacks.wg-easy.containers.wg-easy

Alias of {option}services.podman.containers.wg-easy.

Type
plaintext
submodule
Declaration

nps.stacks.wg-easy.enable

Whether to enable wg-easy.

Type
plaintext
boolean
Default
nix
false
Example
nix
true
Declaration

nps.stacks.wg-easy.extraEnv

Extra environment variables to set for the container. Variables can be either set directly or sourced from a file (e.g. for secrets).

See https://wg-easy.github.io/wg-easy/latest/advanced/config/unattended-setup/

Type
plaintext
attribute set of (null or boolean or signed integer or string or absolute path or (submodule))
Default
nix
{ }
Example
nix
{
  INIT_DNS = "1.1.1.1";
}
Declaration

nps.stacks.wg-easy.host

The external domain or IP address of the Wireguard server. Will be used as the 'endpoint' when generating client configurations.

Only has an effect during initial setup. See https://wg-easy.github.io/wg-easy/latest/advanced/config/unattended-setup/

Type
plaintext
string
Default
nix
"vpn.${config.nps.stacks.traefik.domain}"
Declaration

nps.stacks.wg-easy.port

The port on which the Wireguard server will listen. Will be passed as INIT_PORT during initial setup.

Only has an effect during initial setup. See https://wg-easy.github.io/wg-easy/latest/advanced/config/unattended-setup/

Type
plaintext
16 bit unsigned integer; between 0 and 65535 (both inclusive)
Default
nix
51820
Declaration