Compare commits

..

No commits in common. "4baeb59aaf00ba59c1ab02284153a7a4542f0c5d" and "78f66778119ab4c0663ee8f7c989377ec7c52749" have entirely different histories.

7 changed files with 49 additions and 97 deletions

View File

@ -4,18 +4,11 @@ let
"github:jrpotter/blog/457bfd6c521d5d8eeb41deb7d5d6a925fd55dda9"; "github:jrpotter/blog/457bfd6c521d5d8eeb41deb7d5d6a925fd55dda9";
in in
{ {
services.nginx = { services.nginx.virtualHosts."blog.jrpotter.com" = {
recommendedGzipSettings = true; forceSSL = true;
recommendedOptimisation = true; enableACME = true;
recommendedProxySettings = true; locations."/" = {
recommendedTlsSettings = true; root = blog.packages.${system}.app;
virtualHosts."blog.jrpotter.com" = {
forceSSL = true;
enableACME = true;
locations."/" = {
root = blog.packages.${system}.app;
};
}; };
}; };
} }

View File

@ -9,19 +9,13 @@ let
in in
{ {
services = { services = {
nginx = { nginx.virtualHosts."www.boardwise.gg" = {
recommendedGzipSettings = true; forceSSL = true;
recommendedOptimisation = true; enableACME = true;
recommendedProxySettings = true; serverAliases = [ "boardwise.gg" ];
recommendedTlsSettings = true; locations."/" = {
recommendedProxySettings = true;
virtualHosts."www.boardwise.gg" = { proxyPass = "http://127.0.0.1:4000";
forceSSL = true;
enableACME = true;
serverAliases = [ "boardwise.gg" ];
locations."/" = {
proxyPass = "http://127.0.0.1:4000";
};
}; };
}; };
postgresql = { postgresql = {
@ -48,9 +42,9 @@ in
Type = "exec"; Type = "exec";
EnvironmentFile = "/run/secrets/BOARDWISE_SECRET_KEY_BASE"; EnvironmentFile = "/run/secrets/BOARDWISE_SECRET_KEY_BASE";
ExecStartPre = "${boardwise}/bin/migrate"; ExecStartPre = "${boardwise}/bin/migrate";
ExecStart = "${boardwise}/bin/server start"; ExecStart = "${boardwise}/bin/boardwise start";
ExecStop = "${boardwise}/bin/server stop"; ExecStop = "${boardwise}/bin/reconn stop";
ExecReload = "${boardwise}/bin/server restart"; ExecReload = "${boardwise}/bin/reconn restart";
Restart = "on-failure"; Restart = "on-failure";
}; };
}; };

View File

@ -4,18 +4,11 @@ let
"github:jrpotter/bookshelf/bf9888c050b7a62f58be0198af19a6de7c40b375"; "github:jrpotter/bookshelf/bf9888c050b7a62f58be0198af19a6de7c40b375";
in in
{ {
services.nginx = { services.nginx.virtualHosts."bookshelf.jrpotter.com" = {
recommendedGzipSettings = true; forceSSL = true;
recommendedOptimisation = true; enableACME = true;
recommendedProxySettings = true; locations."/" = {
recommendedTlsSettings = true; root = bookshelf.packages.${system}.app;
virtualHosts."bookshelf.jrpotter.com" = {
forceSSL = true;
enableACME = true;
locations."/" = {
root = bookshelf.packages.${system}.app;
};
}; };
}; };
} }

View File

@ -41,18 +41,12 @@
}; };
}; };
}; };
nginx = { nginx.virtualHosts."git.jrpotter.com" = {
recommendedGzipSettings = true; forceSSL = true;
recommendedOptimisation = true; enableACME = true;
recommendedProxySettings = true; locations."/" = {
recommendedTlsSettings = true; recommendedProxySettings = true;
proxyPass = "http://127.0.0.1:3000";
virtualHosts."git.jrpotter.com" = {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://127.0.0.1:3000";
};
}; };
}; };
}; };

View File

@ -4,19 +4,12 @@ let
"github:jrpotter/notebook/79b715a64c703279f593cad08775b0d73400a19b"; "github:jrpotter/notebook/79b715a64c703279f593cad08775b0d73400a19b";
in in
{ {
services.nginx = { services.nginx.virtualHosts."notebook.jrpotter.com" = {
recommendedGzipSettings = true; forceSSL = true;
recommendedOptimisation = true; enableACME = true;
recommendedProxySettings = true; locations."/" = {
recommendedTlsSettings = true; root = "${notebook.packages.${system}.app}/share";
tryFiles = "$uri $uri.html $uri/ =404";
virtualHosts."notebook.jrpotter.com" = {
forceSSL = true;
enableACME = true;
locations."/" = {
root = "${notebook.packages.${system}.app}/share";
tryFiles = "$uri $uri.html $uri/ =404";
};
}; };
}; };
} }

View File

@ -4,19 +4,12 @@ let
"github:jrpotter/portfolio/eca5e764f26faaa64f6966dbf3970b86eaaf2195"; "github:jrpotter/portfolio/eca5e764f26faaa64f6966dbf3970b86eaaf2195";
in in
{ {
services.nginx = { services.nginx.virtualHosts."www.jrpotter.com" = {
recommendedGzipSettings = true; forceSSL = true;
recommendedOptimisation = true; enableACME = true;
recommendedProxySettings = true; serverAliases = [ "jrpotter.com" ];
recommendedTlsSettings = true; locations."/" = {
root = portfolio.packages.${system}.app;
virtualHosts."www.jrpotter.com" = {
forceSSL = true;
enableACME = true;
serverAliases = [ "jrpotter.com" ];
locations."/" = {
root = portfolio.packages.${system}.app;
};
}; };
}; };
} }

View File

@ -1,25 +1,18 @@
{ system, pkgs, lib, ... }: { system, pkgs, lib, ... }:
let let
reconn = ( reconn = (
builtins.getFlake "git+ssh://forgejo@git.jrpotter.com/r/reconn?rev=42376b2060d00856ed3ea3e9ef9177ef6c7bca80" builtins.getFlake "git+https://git.jrpotter.com/r/reconn?rev=74cb0be878441c4eafcfd2b2c2c926fe87ea8a30"
).packages.${system}.app; ).packages.${system}.app;
in in
{ {
services = { services = {
nginx = { nginx.virtualHosts."www.hideandseek.live" = {
recommendedGzipSettings = true; forceSSL = true;
recommendedOptimisation = true; enableACME = true;
recommendedProxySettings = true; serverAliases = [ "hideandseek.live" ];
recommendedTlsSettings = true; locations."/" = {
recommendedProxySettings = true;
virtualHosts."www.hideandseek.live" = { proxyPass = "http://127.0.0.1:4000";
forceSSL = true;
enableACME = true;
serverAliases = [ "hideandseek.live" ];
locations."/" = {
proxyPass = "http://127.0.0.1:4000";
proxyWebsockets = true;
};
}; };
}; };
postgresql = { postgresql = {
@ -40,16 +33,15 @@ in
after = [ "network.target" "postgresql.service" ]; after = [ "network.target" "postgresql.service" ];
requires = [ "network-online.target" "postgresql.service" ]; requires = [ "network-online.target" "postgresql.service" ];
environment = { environment = {
PHX_HOST = "hideandseek.live";
DATABASE_URL = "ecto://postgres:postgres@localhost/reconn"; DATABASE_URL = "ecto://postgres:postgres@localhost/reconn";
}; };
serviceConfig = { serviceConfig = {
Type = "exec"; Type = "exec";
EnvironmentFile = "/run/secrets/RECONN_SECRET_KEY_BASE"; EnvironmentFile = "/run/secrets/RECONN_SECRET_KEY_BASE";
ExecStartPre = "${reconn}/bin/migrate"; ExecStartPre = "${reconn}/bin/migrate";
ExecStart = "${reconn}/bin/server start"; ExecStart = "${reconn}/bin/reconn start";
ExecStop = "${reconn}/bin/server stop"; ExecStop = "${reconn}/bin/reconn stop";
ExecReload = "${reconn}/bin/server restart"; ExecReload = "${reconn}/bin/reconn restart";
Restart = "on-failure"; Restart = "on-failure";
}; };
}; };