diff --git a/hosts/hainich/configuration.nix b/hosts/hainich/configuration.nix index 4c7ad8a..081ca6b 100644 --- a/hosts/hainich/configuration.nix +++ b/hosts/hainich/configuration.nix @@ -12,7 +12,8 @@ # ./wireguard.nix ./services/nginx.nix # ./k8s.nix - ./services/docker.nix + ./services/ghost_waszumfff.nix + ./services/ghost_A20.nix ./services/gitlab-runner.nix ./services/lantifa.nix ./services/syncthing.nix diff --git a/hosts/hainich/services/ghost_A20.nix b/hosts/hainich/services/ghost_A20.nix new file mode 100644 index 0000000..dc31bc8 --- /dev/null +++ b/hosts/hainich/services/ghost_A20.nix @@ -0,0 +1,32 @@ +{ config, lib, pkgs, ... }: + +{ + virtualisation.oci-containers.containers."ghost-A20" = { + autoStart = true; + environment = { + url = "https://A20.4future.dev"; + }; + image = "ghost:alpine"; + ports = [ "127.0.0.1:2369:2368" ]; + volumes = [ "/run/A20:/var/lib/ghost/content" ]; + }; + + fileSystems."/run/A20" = + { device = "dpool/k8s/A20"; + fsType = "zfs"; + }; + + services.nginx.virtualHosts."A20.4future.dev" = { + enableACME = true; + forceSSL = true; + locations."/" = { + proxyPass = "http://127.0.0.1:2369"; + extraConfig = " + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header X-Forwarded-Host $http_host; + "; + }; + }; +} diff --git a/hosts/hainich/services/docker.nix b/hosts/hainich/services/ghost_waszumfff.nix similarity index 100% rename from hosts/hainich/services/docker.nix rename to hosts/hainich/services/ghost_waszumfff.nix