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;
|
domain = config.networking.domain;
|
||||||
|
|
||||||
virtualHostOption = with lib; types.submodule {
|
virtualHostOption = with lib; types.submodule ({ name, ... }: {
|
||||||
options = {
|
options = {
|
||||||
subdomain = mkOption {
|
subdomain = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
|
default = name;
|
||||||
example = "dev";
|
example = "dev";
|
||||||
description = ''
|
description = ''
|
||||||
Which subdomain, under config.networking.domain, to use
|
Which subdomain, under config.networking.domain, to use
|
||||||
|
@ -72,7 +73,7 @@ let
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
});
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
@ -106,11 +107,9 @@ in
|
||||||
port = 8080;
|
port = 8080;
|
||||||
};
|
};
|
||||||
dev = {
|
dev = {
|
||||||
subdomain = "dev";
|
|
||||||
root = "/var/www/dev";
|
root = "/var/www/dev";
|
||||||
};
|
};
|
||||||
jellyfin = {
|
jellyfin = {
|
||||||
subdomain = "jellyfin";
|
|
||||||
port = 8096;
|
port = 8096;
|
||||||
extraConfig = {
|
extraConfig = {
|
||||||
locations."/socket" = {
|
locations."/socket" = {
|
||||||
|
|
Loading…
Reference in a new issue