wg-portal
GUI to manage your WireGuard peers and interfaces
Example
{config, ...}: {
nps.stacks.wg-portal = {
enable = true;
port = 51825;
settings = {
advanved.use_ip_v6 = false;
core = {
admin_user = "admin";
# Read admin password from env variable 'ADMIN_PASSWORD'
admin_password = "\${ADMIN_PASSWORD}";
};
};
# Provide the admin password env variable
extraEnv.ADMIN_PASSWORD.fromFile = config.sops.secrets."wg-portal/admin_password".path;
oidc = {
enable = true;
clientSecretFile = config.sops.secrets."wg-portal/authelia/client_secret".path;
clientSecretHash = "$pbkdf2-sha512$...";
};
};
}Stack Options
nps.stacks.wg-portal.containers.wg-portal
Alias of {option}services.podman.containers.wg-portal.
nps.stacks.wg-portal.enable
Whether to enable wg-portal.
nps.stacks.wg-portal.extraEnv
Extra environment variables to set for the container. Variables can be either set directly or sourced from a file (e.g. for secrets).
Can be used to pass secrets or other environment variables that are referenced in the settings.
attribute set of (null or boolean or signed integer or string or absolute path or (submodule))
{ }
{
ADMIN_PASSWORD = {
fromFile = "/run/secrets/secret_name";
};
}
nps.stacks.wg-portal.oidc.adminGroup
Users of this group will be assigned admin rights
nps.stacks.wg-portal.oidc.clientSecretFile
The file containing the client secret for the OIDC client that will be registered in Authelia.
For examples on how to generate a client secret, see
https://www.authelia.com/integration/openid-connect/frequently-asked-questions/#client-secret
string
config.sops.secrets."immich/authelia/client_secret".path"
nps.stacks.wg-portal.oidc.clientSecretHash
The client secret hash. For examples on how to generate a client secret, see https://www.authelia.com/integration/openid-connect/frequently-asked-questions/#client-secret
The value can be passed in multiple ways:
- As a literal string
- As an absolute path to a file containing the hash (
toFile) - As an absolute oath to a file containing the client_secret, in which case the hash will be automatically computed (
toHash) - As
null
If left unset (null), the client secret will be read from the file specified in the clientSecretFile option and hashed automatically before being passed to the Authelia container.
null or string or (submodule)
null
# Literal String:
"$pbkdf2-sha512$310000$cbOAIWbfz3vCVXIPIp6d2A$J0klwULa6TvPRCU1HAfuKua/dMKTl8gbTYJz2N73ejGUu0LUGz/y3kwmJLuKuAYGg3WQOT0q9ZzVHHUvpKpgvQ"
# Client secret hash stored in a file
{ fromFile = config.sops.secrets."immich/client_secret_hash".path; }
# Client secret stored in a file: Hash will be computed dynamically
{ toHash = config.sops.secrets."immich/client_secret".path; }
# Null (default): Hash will be computed automatically based on the clientSecretFile option
# Equivalent to { toHash = cfg.oidc.clientSecretFile; }
null
nps.stacks.wg-portal.oidc.enable
Whether to enable OIDC login with Authelia. This will register an OIDC client in Authelia and setup the necessary configuration.
For details, see:
nps.stacks.wg-portal.oidc.userGroup
Users of this group will be able to log in
nps.stacks.wg-portal.port
The default port for the first Wireguard interface that will be set up in the UI. Will be exposed and passed as the 'start_listen_port' setting in the configuration.
16 bit unsigned integer; between 0 and 65535 (both inclusive)
51820
nps.stacks.wg-portal.settings
Settings for the wg-portal container. Will be converted to YAML and passed to the container.
See https://wgportal.org/latest/documentation/configuration/overview/
YAML 1.1 value
{
core = {
admin = {
password = "\${ADMIN_PASSWORD}";
username = "admin";
};
};
}