nix/host/x86_64-linux/home/nginx/Share.nix

26 lines
464 B
Nix

{ config, ... }:
let
cfg = config.module.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;
};
};
};
}