nixos: services: nginx: remove 'literalExample'

Those examples do not use functions or any other "difficult to render"
expression.
This commit is contained in:
Bruno BELANYI 2024-09-27 13:44:23 +00:00
parent 20db71996c
commit cbba752b54

View file

@ -59,14 +59,12 @@ let
extraConfig = mkOption { extraConfig = mkOption {
type = types.attrs; # FIXME: forward type of virtualHosts type = types.attrs; # FIXME: forward type of virtualHosts
example = litteralExample '' example = {
{
locations."/socket" = { locations."/socket" = {
proxyPass = "http://127.0.0.1:8096/"; proxyPass = "http://127.0.0.1:8096/";
proxyWebsockets = true; proxyWebsockets = true;
}; };
} };
'';
default = { }; default = { };
description = '' description = ''
Any extra configuration that should be applied to this virtual host. Any extra configuration that should be applied to this virtual host.
@ -100,8 +98,7 @@ in
virtualHosts = mkOption { virtualHosts = mkOption {
type = types.attrsOf virtualHostOption; type = types.attrsOf virtualHostOption;
default = { }; default = { };
example = litteralExample '' example = {
{
gitea = { gitea = {
subdomain = "git"; subdomain = "git";
port = 8080; port = 8080;
@ -118,8 +115,7 @@ in
}; };
}; };
}; };
} };
'';
description = '' description = ''
List of virtual hosts to set-up using default settings. List of virtual hosts to set-up using default settings.
''; '';
@ -163,25 +159,21 @@ in
}; };
}; };
}); });
example = litteralExample '' example = {
{
alice = { alice = {
passwordHashFile = "/var/lib/nginx-sso/alice/password-hash.txt"; passwordHashFile = "/var/lib/nginx-sso/alice/password-hash.txt";
totpSecretFile = "/var/lib/nginx-sso/alice/totp-secret.txt"; totpSecretFile = "/var/lib/nginx-sso/alice/totp-secret.txt";
}; };
} };
'';
description = "Definition of users"; description = "Definition of users";
}; };
groups = mkOption { groups = mkOption {
type = with types; attrsOf (listOf str); type = with types; attrsOf (listOf str);
example = litteralExample '' example = {
{
root = [ "alice" ]; root = [ "alice" ];
users = [ "alice" "bob" ]; users = [ "alice" "bob" ];
} };
'';
description = "Groups of users"; description = "Groups of users";
}; };
}; };