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

28 lines
489 B
Nix

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