nix-config/hosts/containers/blogs/default.nix

34 lines
907 B
Nix
Raw Normal View History

{ hostRegistry, zentralwerk, config, ... }:
2021-12-24 03:18:20 +01:00
{
networking = {
hostName = "blogs";
useNetworkd = true;
interfaces.eth0.ipv4.addresses = [{
address = hostRegistry.hosts."${config.networking.hostName}".ip4;
prefixLength = zentralwerk.lib.config.site.net.serv.subnet4Len;
}];
defaultGateway = "172.20.73.1";
firewall.allowedTCPPorts = [
80 443
];
};
2021-12-25 02:02:45 +01:00
# See secrets/hosts/blogs for the .env file with all settings
2021-12-29 21:32:20 +01:00
services.plume = {
enable = true;
envFile = config.sops.secrets."plume/env".path;
};
2021-12-25 02:02:45 +01:00
sops.secrets = {
"plume/env".owner = config.systemd.services.plume.serviceConfig.User;
2021-12-24 03:18:20 +01:00
};
2021-12-25 02:02:45 +01:00
sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
2021-12-24 03:18:20 +01:00
services.nginx.enable = true;
services.nginx.virtualHosts."blogs.c3d2.de" = {
forceSSL = true;
enableACME = true;
locations."/".proxyPass = "http://localhost:7878";
};
}