nix/host/x86_64-linux/home/nginx/Share.nix
2025-01-09 20:13:07 +03:00

26 lines
457 B
Nix

{ config, ... }:
let
cfg = config.const.host.nginx;
root = "/storage/hot/share";
index = ''
autoindex on;
charset UTF-8;
'';
in
{
"share.${cfg.domain}" = {
inherit (cfg) sslCertificate sslCertificateKey extraConfig;
locations = {
# "~* /$" = {
"= /" = {
inherit root;
extraConfig = index + cfg.allowLocal;
};
"/" = {
inherit root;
extraConfig = index;
};
};
};
}