Have phobos enable NGINX.

main
Joshua Potter 2023-12-12 07:35:29 -07:00
parent 17534ecfb0
commit 2a8b35c82e
2 changed files with 23 additions and 3 deletions

View File

@ -21,6 +21,10 @@ in
}; };
}; };
services.openssh.enable = true;
programs.mosh.enable = true;
services.postgresql = { services.postgresql = {
enable = true; enable = true;
package = pkgs.postgresql_15; package = pkgs.postgresql_15;
@ -39,7 +43,6 @@ in
requires = [ "postgresql.service" ]; requires = [ "postgresql.service" ];
serviceConfig = { serviceConfig = {
Environment = [ Environment = [
"PORT=80"
"DATABASE_URL=ecto://postgres:postgres@localhost/boardwise" "DATABASE_URL=ecto://postgres:postgres@localhost/boardwise"
]; ];
EnvironmentFile = "/run/secrets/SECRET_KEY_BASE"; EnvironmentFile = "/run/secrets/SECRET_KEY_BASE";
@ -56,5 +59,22 @@ in
sops.defaultSopsFile = ./secrets.yaml; sops.defaultSopsFile = ./secrets.yaml;
sops.secrets.SECRET_KEY_BASE = {}; 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; system.stateVersion = stateVersion;
} }

View File

@ -5,12 +5,12 @@
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
]; ];
nix.settings.experimental-features = [ "nix-command" "flakes" ];
deployment.targetHost = "143.110.158.6"; deployment.targetHost = "143.110.158.6";
networking.hostName = "titan"; networking.hostName = "titan";
nix.settings.experimental-features = [ "nix-command" "flakes" ];
services.openssh.enable = true; services.openssh.enable = true;
programs.mosh.enable = true; programs.mosh.enable = true;