nixos/nginx: remove deprecated vhost option enableSSL (#446053)
This commit is contained in:
@@ -324,7 +324,7 @@ let
|
||||
mapAttrsToList (
|
||||
vhostName: vhost:
|
||||
let
|
||||
onlySSL = vhost.onlySSL || vhost.enableSSL;
|
||||
onlySSL = vhost.onlySSL;
|
||||
hasSSL = onlySSL || vhost.addSSL || vhost.forceSSL;
|
||||
|
||||
# First evaluation of defaultListen based on a set of listen lines.
|
||||
@@ -1324,18 +1324,6 @@ in
|
||||
];
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
warnings =
|
||||
let
|
||||
deprecatedSSL =
|
||||
name: config:
|
||||
optional config.enableSSL ''
|
||||
config.services.nginx.virtualHosts.<name>.enableSSL is deprecated,
|
||||
use config.services.nginx.virtualHosts.<name>.onlySSL instead.
|
||||
'';
|
||||
|
||||
in
|
||||
flatten (mapAttrsToList deprecatedSSL virtualHosts);
|
||||
|
||||
assertions =
|
||||
let
|
||||
hostOrAliasIsNull = l: l.root == null || l.alias == null;
|
||||
@@ -1352,7 +1340,7 @@ in
|
||||
with host;
|
||||
count id [
|
||||
addSSL
|
||||
(onlySSL || enableSSL)
|
||||
onlySSL
|
||||
forceSSL
|
||||
rejectSSL
|
||||
] <= 1
|
||||
|
||||
@@ -170,12 +170,6 @@ with lib;
|
||||
'';
|
||||
};
|
||||
|
||||
enableSSL = mkOption {
|
||||
type = types.bool;
|
||||
visible = false;
|
||||
default = false;
|
||||
};
|
||||
|
||||
forceSSL = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
|
||||
@@ -18,7 +18,7 @@ in
|
||||
virtualHosts.${name} = {
|
||||
enableACME = false;
|
||||
forceSSL = false;
|
||||
enableSSL = false;
|
||||
onlySSL = false;
|
||||
|
||||
locations."/_matrix" = {
|
||||
proxyPass = "http://[::1]:6167";
|
||||
|
||||
Reference in New Issue
Block a user