2024-05-05 19:39:35 +02:00
|
|
|
{ lib, config, pkgs, ... }:
|
|
|
|
|
|
|
|
{
|
2024-05-31 18:07:39 +02:00
|
|
|
services = {
|
|
|
|
hydra = {
|
|
|
|
enable = true;
|
2024-05-31 20:42:16 +02:00
|
|
|
hydraURL = "https://hydra.home.opel-online.de";
|
2024-06-02 12:27:03 +02:00
|
|
|
listenHost = "127.0.0.1";
|
2024-05-31 18:07:39 +02:00
|
|
|
notificationSender = "hydra@localhost";
|
|
|
|
useSubstitutes = true;
|
2024-05-31 20:42:16 +02:00
|
|
|
minimumDiskFree = 30;
|
2024-05-31 18:07:39 +02:00
|
|
|
};
|
|
|
|
nix-serve = {
|
|
|
|
enable = true;
|
|
|
|
port = 5001;
|
2024-05-31 20:42:16 +02:00
|
|
|
bindAddress = "127.0.0.1";
|
2024-05-31 18:07:39 +02:00
|
|
|
secretKeyFile = config.age.secrets."keys/nixsign".path;
|
|
|
|
};
|
|
|
|
nginx = {
|
|
|
|
enable = true;
|
|
|
|
virtualHosts = {
|
2024-06-02 12:27:03 +02:00
|
|
|
"home.opel-online.de" = {
|
2024-05-31 18:07:39 +02:00
|
|
|
enableACME = true;
|
|
|
|
forceSSL = true;
|
2024-06-02 12:27:03 +02:00
|
|
|
default = true;
|
|
|
|
locations."/".return = "503";
|
|
|
|
};
|
|
|
|
"hydra.home.opel-online.de" = {
|
|
|
|
useACMEHost = "home.opel-online.de";
|
|
|
|
forceSSL = true;
|
2024-05-31 19:46:43 +02:00
|
|
|
locations."/".proxyPass = "http://localhost:3000";
|
2024-05-31 18:07:39 +02:00
|
|
|
};
|
2024-05-31 20:42:16 +02:00
|
|
|
"cache.home.opel-online.de" = {
|
2024-06-02 12:27:03 +02:00
|
|
|
useACMEHost = "home.opel-online.de";
|
2024-05-31 20:42:16 +02:00
|
|
|
forceSSL = true;
|
|
|
|
locations."/".proxyPass = "http://localhost:5001";
|
|
|
|
};
|
2024-05-31 18:07:39 +02:00
|
|
|
};
|
|
|
|
};
|
2024-05-20 10:29:52 +02:00
|
|
|
};
|
|
|
|
|
2024-05-31 18:07:39 +02:00
|
|
|
security.acme = {
|
|
|
|
acceptTerms = true;
|
2024-05-31 20:42:16 +02:00
|
|
|
defaults = {
|
|
|
|
email = "webmaster@kabtop.de";
|
2024-05-31 20:56:09 +02:00
|
|
|
#server = "https://acme-staging-v02.api.letsencrypt.org/directory";
|
2024-06-02 12:27:03 +02:00
|
|
|
dnsResolver = "1.1.1.1:53";
|
2024-05-31 20:56:09 +02:00
|
|
|
};
|
|
|
|
certs = {
|
2024-06-02 12:27:03 +02:00
|
|
|
"home.opel-online.de" = {
|
|
|
|
domain = "*.home.opel-online.de";
|
2024-05-31 20:56:09 +02:00
|
|
|
dnsProvider = "netcup";
|
|
|
|
environmentFile = config.age.secrets."services/acme/opel-online".path;
|
|
|
|
webroot = null;
|
2024-06-02 12:27:03 +02:00
|
|
|
#extraDomainNames = [
|
|
|
|
# "hydra.home.opel-online.de"
|
|
|
|
# "cache.home.opel-online.de"
|
|
|
|
#];
|
2024-05-31 20:56:09 +02:00
|
|
|
};
|
2024-05-31 18:07:39 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-05-20 10:29:52 +02:00
|
|
|
nix = {
|
|
|
|
settings.trusted-users = [
|
|
|
|
"hydra"
|
|
|
|
];
|
|
|
|
|
|
|
|
extraOptions = ''
|
|
|
|
secret-key-files = ${config.age.secrets."keys/nixsign".path}
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
age.secrets."keys/nixsign" = {
|
|
|
|
file = ../../../secrets/keys/nixservepriv.age;
|
|
|
|
owner = "hydra";
|
|
|
|
};
|
2024-05-31 18:07:39 +02:00
|
|
|
age.secrets."services/acme/opel-online" = {
|
2024-05-31 18:27:51 +02:00
|
|
|
file = ../../../secrets/services/acme/opel-online.age;
|
2024-05-31 18:07:39 +02:00
|
|
|
owner = "acme";
|
|
|
|
};
|
2024-05-20 10:29:52 +02:00
|
|
|
|
2024-05-05 19:39:35 +02:00
|
|
|
|
|
|
|
}
|