29 lines
551 B
Nix
29 lines
551 B
Nix
{
|
|
lib,
|
|
config,
|
|
...
|
|
}: let
|
|
inherit (lib) mkIf;
|
|
cfg = config.conf.website;
|
|
me = {
|
|
name = "mira";
|
|
};
|
|
in
|
|
mkIf cfg.enable {
|
|
services.nginx.virtualHosts = {
|
|
${cfg.domain.me} = {
|
|
default = true;
|
|
serverName = cfg.domain.me;
|
|
useACMEHost = cfg.domain.base;
|
|
forceSSL = true;
|
|
locations = {
|
|
"/about.json" = {
|
|
return = builtins.toJson me;
|
|
extraConfig = ''
|
|
default_type application/json;
|
|
'';
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|