diff --git a/hosts/2maccabees/default.nix b/hosts/2maccabees/default.nix index 1780298..dd9df0e 100644 --- a/hosts/2maccabees/default.nix +++ b/hosts/2maccabees/default.nix @@ -1,12 +1,13 @@ { config, pkgs, ... }: { - imports = [ - ./networking.nix - ./dnsmasq.nix - ./home-assistant.nix - ../../profiles/rpi4.nix - ../../profiles/home.nix - ]; - networking.hostName = "2maccabees"; + imports = [ + ./networking.nix + ./dnsmasq.nix + ./home-assistant.nix + ./vhosts.nix + ../../profiles/rpi4.nix + ../../profiles/home.nix + ]; + networking.hostName = "2maccabees"; } diff --git a/hosts/2maccabees/vhosts.nix b/hosts/2maccabees/vhosts.nix new file mode 100644 index 0000000..0f9902c --- /dev/null +++ b/hosts/2maccabees/vhosts.nix @@ -0,0 +1,21 @@ +# Virtual hosts that don't seem to have any better place to live should go in here. +# There are others that are specific to their own purposese scattered about in the +# configuration in places where they more naturally live. This is more of a catchall +# for ones that do not have a better place to live +{ ... }: + +{ + services.nginx = { + enable = true; + # A proxy front-end for Syncthing + virtualHosts."dns.thehellings.lan" = { + locations = { + "/sync" = { + proxyPass = "http://127.0.0.1:8384"; + proxyWebsockets = true; + }; + }; + serverAliases = [ "dns" ]; + }; + }; +}