nixos/nginx: remove deprecated vhost option enableSSL

The option services.nginx.virtualHost.<...>.enableSSL is deprecated for
8 years [^1]. It causes confusion for people who guess the option and
think it's the right one.
I think it's time to remove it for good.

^1: https://github.com/NixOS/nixpkgs/commit/a912a6a291eaa5f6a2ad9143c9e276779c357a41
This commit is contained in:
Leona Maroni
2025-09-25 16:34:38 +02:00
parent 2cd3cac166
commit 6b7e5a5aca
3 changed files with 3 additions and 21 deletions
@@ -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;
+1 -1
View File
@@ -18,7 +18,7 @@ in
virtualHosts.${name} = {
enableACME = false;
forceSSL = false;
enableSSL = false;
onlySSL = false;
locations."/_matrix" = {
proxyPass = "http://[::1]:6167";