enforce new flake schema. formatting.
Some checks failed
Build tests / build-hosts (pull_request) Failing after 3s
Flake check / flake-check (pull_request) Failing after 13s

This commit is contained in:
sid 2026-05-31 18:50:41 +02:00
parent 4b0a90e00d
commit ecf5132cbb
121 changed files with 1606 additions and 1554 deletions

View file

@ -2,9 +2,9 @@
let
cfg = config.services.ftp-webserver;
domain = config.networking.domain;
inherit (config.networking) domain;
fqdn = if (cfg.subdomain != "") then "${cfg.subdomain}.${domain}" else domain;
nginx = config.services.nginx;
inherit (config.services) nginx;
inherit (lib)
mkEnableOption
@ -35,7 +35,7 @@ in
config = mkIf cfg.enable {
services.nginx.virtualHosts."${fqdn}" = {
root = cfg.root;
inherit (cfg) root;
locations."/" = {
extraConfig = ''
autoindex on;
@ -43,7 +43,7 @@ in
autoindex_localtime on;
'';
};
forceSSL = cfg.forceSSL;
inherit (cfg) forceSSL;
enableACME = cfg.forceSSL;
sslCertificate = mkIf cfg.forceSSL "${config.security.acme.certs."${fqdn}".directory}/cert.pem";
sslCertificateKey = mkIf cfg.forceSSL "${config.security.acme.certs."${fqdn}".directory}/key.pem";