59 lines
964 B
Nix
59 lines
964 B
Nix
/*
|
|
This file is for hosting teh open governance for other societies
|
|
*/
|
|
{
|
|
lib,
|
|
config,
|
|
pkgs,
|
|
...
|
|
}:
|
|
with lib; let
|
|
name = "keyserver";
|
|
cfg = config.services.skynet."${name}";
|
|
port = 11371;
|
|
in {
|
|
imports = [
|
|
../acme.nix
|
|
../dns.nix
|
|
];
|
|
|
|
options.services.skynet."${name}" = {
|
|
host = {
|
|
ip = mkOption {
|
|
type = types.str;
|
|
};
|
|
name = mkOption {
|
|
type = types.str;
|
|
};
|
|
};
|
|
};
|
|
|
|
config = {
|
|
skynet_acme.domains = [
|
|
"${name}.skynet.ie"
|
|
];
|
|
|
|
skynet_dns.records = [
|
|
{
|
|
record = "${name}";
|
|
r_type = "CNAME";
|
|
value = cfg.host.name;
|
|
}
|
|
];
|
|
|
|
services.sks = {
|
|
enable = true;
|
|
hkpPort = port;
|
|
};
|
|
|
|
services.nginx.virtualHosts = {
|
|
"${name}.skynet.ie" = {
|
|
forceSSL = true;
|
|
useACMEHost = "skynet";
|
|
locations."/" = {
|
|
proxyPass = "http://localhost:${toString port}";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|