{ config, pkgs, lib, spacebar-server, secrets, ... }: { containers."spacebarchat-server-dev-nix" = import ./container.nix { inherit pkgs lib spacebar-server; }; security.acme.certs."dev-nix.server.spacebar.chat" = { domain = "dev-nix.server.spacebar.chat"; extraDomainNames = [ "*.dev-nix.server.spacebar.chat" ]; group = "nginx"; dnsProvider = "cloudflare"; credentialsFile = pkgs.writeTextFile { name = "cloudflare-credentials"; text = '' # Cloudflare API credentials used by lego # https://go-acme.github.io/lego/dns/cloudflare/ CLOUDFLARE_DNS_API_TOKEN=${secrets.secret_keys.cloudflare_dns} ''; }; }; services.nginx.virtualHosts."*.dev-nix.server.spacebar.chat" = { serverName = "*.dev-nix.server.spacebar.chat"; useACMEHost = "dev-nix.server.spacebar.chat"; forceSSL = true; locations."/" = { proxyPass = "http://192.168.100.1"; }; }; services.nginx.virtualHosts."dev-nix.server.spacebar.chat" = { serverName = "dev-nix.server.spacebar.chat"; useACMEHost = "dev-nix.server.spacebar.chat"; forceSSL = true; locations."/" = { proxyPass = "http://192.168.100.1"; }; }; system.stateVersion = "22.11"; # DO NOT EDIT! }