52 lines
1.2 KiB
Nix
52 lines
1.2 KiB
Nix
{
|
|
lib,
|
|
config,
|
|
...
|
|
}: let
|
|
inherit (lib) mkIf;
|
|
cfg = config.conf.website;
|
|
me = {
|
|
name = "mira";
|
|
pronouns = ["she/her/hers" "it/its/its"];
|
|
queer = ["trans" "lesbian"];
|
|
languages = {
|
|
german = 1.0;
|
|
english = 0.9;
|
|
dutch = 0.4;
|
|
spanish = 0.1;
|
|
};
|
|
i18n = {
|
|
timezone = "Europe/Amsterdam";
|
|
currency = "EUR";
|
|
location = "Netherlands";
|
|
};
|
|
contact = {
|
|
email = "hi@chpu.eu";
|
|
fedi = "@mira@fedi.twoneis.site";
|
|
};
|
|
ssh = {
|
|
id_ed25519 = "https://${cfg.domain.me}/ssh/id_ed25519.pub";
|
|
id_ed25519_sk = "https://${cfg.domain.me}/ssh/id_ed25519_sk.pub";
|
|
};
|
|
};
|
|
in
|
|
mkIf cfg.enable {
|
|
services.nginx.virtualHosts = {
|
|
${cfg.domain.me} = {
|
|
serverName = cfg.domain.me;
|
|
useACMEHost = cfg.domain.base;
|
|
forceSSL = true;
|
|
locations = {
|
|
"/about.json" = {
|
|
return = "200 '${builtins.readFile ./about.json}'";
|
|
};
|
|
"/ssh/id_ed25519.pub" = {
|
|
return = "200 '${./id_ed25519.pub}'";
|
|
};
|
|
"/ssh/id_ed25519_sk.pub" = {
|
|
return = "200 '${./id_ed25519_sk.pub}'";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|