From 2a8b35c82e3fd584715800e0dc25a2b4c9e41b57 Mon Sep 17 00:00:00 2001 From: Joshua Potter Date: Tue, 12 Dec 2023 07:35:29 -0700 Subject: [PATCH] Have phobos enable NGINX. --- hive/phobos/default.nix | 22 +++++++++++++++++++++- hive/titan/default.nix | 4 ++-- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/hive/phobos/default.nix b/hive/phobos/default.nix index 59671e6..8078a4b 100644 --- a/hive/phobos/default.nix +++ b/hive/phobos/default.nix @@ -21,6 +21,10 @@ in }; }; + services.openssh.enable = true; + + programs.mosh.enable = true; + services.postgresql = { enable = true; package = pkgs.postgresql_15; @@ -39,7 +43,6 @@ in requires = [ "postgresql.service" ]; serviceConfig = { Environment = [ - "PORT=80" "DATABASE_URL=ecto://postgres:postgres@localhost/boardwise" ]; EnvironmentFile = "/run/secrets/SECRET_KEY_BASE"; @@ -56,5 +59,22 @@ in sops.defaultSopsFile = ./secrets.yaml; sops.secrets.SECRET_KEY_BASE = {}; + security.acme.acceptTerms = true; + security.acme.defaults.email = "jrpotter2112@gmail.com"; + services.nginx = { + enable = true; + virtualHosts = { + "www.boardwise.gg" = { + # forceSSL = true; + enableACME = true; + serverAliases = [ "boardwise.gg" ]; + locations."/" = { + recommendedProxySettings = true; + proxyPass = "http://127.0.0.1:4000"; + }; + }; + }; + }; + system.stateVersion = stateVersion; } diff --git a/hive/titan/default.nix b/hive/titan/default.nix index 3ce6b82..96613e3 100644 --- a/hive/titan/default.nix +++ b/hive/titan/default.nix @@ -5,12 +5,12 @@ home-manager.nixosModules.home-manager ]; + nix.settings.experimental-features = [ "nix-command" "flakes" ]; + deployment.targetHost = "143.110.158.6"; networking.hostName = "titan"; - nix.settings.experimental-features = [ "nix-command" "flakes" ]; - services.openssh.enable = true; programs.mosh.enable = true;