nixos/caddy: remove admin check
Since it introduces IFD.
This commit is contained in:
parent
1f0ac736b4
commit
27b7132e81
@ -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};
|
||||
|
Loading…
Reference in New Issue
Block a user