nixos: services: nginx: add default subdomain
In almost all cases, the subdomain should be the same as the attribute name...
This commit is contained in:
parent
faa87743e5
commit
b7a4bc063f
|
@ -5,10 +5,11 @@ let
|
|||
|
||||
domain = config.networking.domain;
|
||||
|
||||
virtualHostOption = with lib; types.submodule {
|
||||
virtualHostOption = with lib; types.submodule ({ name, ... }: {
|
||||
options = {
|
||||
subdomain = mkOption {
|
||||
type = types.str;
|
||||
default = name;
|
||||
example = "dev";
|
||||
description = ''
|
||||
Which subdomain, under config.networking.domain, to use
|
||||
|
@ -72,7 +73,7 @@ let
|
|||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
});
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
|
@ -106,11 +107,9 @@ in
|
|||
port = 8080;
|
||||
};
|
||||
dev = {
|
||||
subdomain = "dev";
|
||||
root = "/var/www/dev";
|
||||
};
|
||||
jellyfin = {
|
||||
subdomain = "jellyfin";
|
||||
port = 8096;
|
||||
extraConfig = {
|
||||
locations."/socket" = {
|
||||
|
|
Loading…
Reference in a new issue