From 27b7132e811addbe6dad8e07daf90b23bc86d3a1 Mon Sep 17 00:00:00 2001 From: Sylvain Fankhauser Date: Sun, 14 May 2023 19:50:50 +0200 Subject: [PATCH] nixos/caddy: remove admin check Since it introduces IFD. --- nixos/modules/services/web-servers/caddy/default.nix | 7 ------- 1 file changed, 7 deletions(-) diff --git a/nixos/modules/services/web-servers/caddy/default.nix b/nixos/modules/services/web-servers/caddy/default.nix index 1056b9525ac9..5cc9ef6dd6d9 100644 --- a/nixos/modules/services/web-servers/caddy/default.nix +++ b/nixos/modules/services/web-servers/caddy/default.nix @@ -41,10 +41,6 @@ let in "${if pkgs.stdenv.buildPlatform == pkgs.stdenv.hostPlatform then Caddyfile-formatted else Caddyfile}/Caddyfile"; - adminDisabled = lib.fileContents (pkgs.runCommand "caddy-config-adapted" {} '' - ${cfg.package}/bin/caddy adapt --config ${configFile} ${optionalString (cfg.adapter != null) "--adapter ${cfg.adapter}"} | ${pkgs.jq}/bin/jq .admin.disabled > $out - '') == "true"; - etcConfigFile = "caddy/caddy_config"; configPath = "/etc/${etcConfigFile}"; @@ -312,9 +308,6 @@ in { assertion = cfg.configFile == configFile -> cfg.adapter == "caddyfile" || cfg.adapter == null; message = "To specify an adapter other than 'caddyfile' please provide your own configuration via `services.caddy.configFile`"; } - { assertion = cfg.enableReload -> !adminDisabled; - message = "You need to remove `admin off` from your Caddy configuration in order to use `services.caddy.enableReload`"; - } ] ++ map (name: mkCertOwnershipAssertion { inherit (cfg) group user; cert = config.security.acme.certs.${name};