nginx: use host name and aliases as default server-names

This commit is contained in:
tv 2016-07-22 13:06:15 +02:00
parent 1c931a1f45
commit 8b58e6e6e2

View file

@ -31,12 +31,10 @@ let
options = {
server-names = mkOption {
type = with types; listOf str;
# TODO use identity
default = [
"${config.networking.hostName}"
"${config.networking.hostName}.r"
"${config.networking.hostName}.retiolum"
];
default =
[config.krebs.build.host.name] ++
concatMap (getAttr "aliases")
(attrValues config.krebs.build.host.nets);
};
listen = mkOption {
type = with types; either str (listOf str);