Add postgres
3 files changed, 62 insertions, 60 deletions
diff --git a/host/Rory-ovh/configuration.nix b/host/Rory-ovh/configuration.nix
index 7c031c4..cc2ea4e 100755
--- a/host/Rory-ovh/configuration.nix
+++ b/host/Rory-ovh/configuration.nix
@@ -19,6 +19,8 @@
./services/prometheus.nix
+ ./services/nginx/nginx.nix
+ ./services/postgres.nix
];
users.groups.ocp = { };
diff --git a/host/Rory-ovh/services/nginx/nginx.nix b/host/Rory-ovh/services/nginx/nginx.nix
index 01eaac6..fc6a56e 100755
--- a/host/Rory-ovh/services/nginx/nginx.nix
+++ b/host/Rory-ovh/services/nginx/nginx.nix
@@ -39,63 +39,63 @@ in
additionalModules = with pkgs.nginxModules; [ moreheaders ];
virtualHosts = {
#"boorunav.com" = serveDir { path = "/data/nginx/html_boorunav"; };
- "catgirlsaresexy.com" = serveDir { path = "/data/nginx/html_catgirlsaresexy"; };
- "sugarcanemc.org" = serveDir { path = "/data/nginx/html_sugarcanemc"; };
-
- "siliconheaven.thearcanebrony.net" = serveDir { path = "/data/nginx/html_siliconheaven"; };
- "lfs.thearcanebrony.net" = serveDir { path = "/data/nginx/html_lfs"; };
- "git.thearcanebrony.net" = serveDir { path = "/data/nginx/html_git"; };
- "files.thearcanebrony.net" = serveDir { path = "/data/nginx/html_files"; };
- "spigotav.thearcanebrony.net" = serveDir { path = "/data/nginx/html_spigotav"; };
- "terra.thearcanebrony.net" = serveDir { path = "/data/nginx/html_terrarchive"; };
- "vives.thearcanebrony.net" = serveDir { path = "/data/nginx/html_vives"; };
-
- "git.rory.gay" = serveDir { path = "/data/nginx/html_git"; };
- "wad.rory.gay" = serveDir { path = "/data/nginx/html_wad"; } // {
- locations."/".extraConfig = "autoindex on; try_files $uri $uri/ /index.html;";
- };
- "wad-api.rory.gay" = import ./rory.gay/wad-api.nix;
-
- "thearcanebrony.net" = import ./thearcanebrony.net/root.nix;
- "sentry.thearcanebrony.net" = import ./thearcanebrony.net/sentry.nix;
- "search.thearcanebrony.net" = import ./thearcanebrony.net/search.nix;
-
- "rory.gay" = import ./rory.gay/root.nix;
- "lfs.rory.gay" = serveDir { path = "/data/nginx/html_lfs"; };
-
- "awooradio.thearcanebrony.net" = import ./thearcanebrony.net/awooradio.nix;
- "cgit.rory.gay" = import ./rory.gay/cgit.nix;
- #"jitsi.rory.gay" = import ./rory.gay/jitsi.nix;
-
- #matrix...
- "conduit.rory.gay" = import ./rory.gay/conduit.nix;
+ # "catgirlsaresexy.com" = serveDir { path = "/data/nginx/html_catgirlsaresexy"; };
+ # "sugarcanemc.org" = serveDir { path = "/data/nginx/html_sugarcanemc"; };
+#
+ # "siliconheaven.thearcanebrony.net" = serveDir { path = "/data/nginx/html_siliconheaven"; };
+ # "lfs.thearcanebrony.net" = serveDir { path = "/data/nginx/html_lfs"; };
+ # "git.thearcanebrony.net" = serveDir { path = "/data/nginx/html_git"; };
+ # "files.thearcanebrony.net" = serveDir { path = "/data/nginx/html_files"; };
+ # "spigotav.thearcanebrony.net" = serveDir { path = "/data/nginx/html_spigotav"; };
+ # "terra.thearcanebrony.net" = serveDir { path = "/data/nginx/html_terrarchive"; };
+ # "vives.thearcanebrony.net" = serveDir { path = "/data/nginx/html_vives"; };
+#
+ # "git.rory.gay" = serveDir { path = "/data/nginx/html_git"; };
+ # "wad.rory.gay" = serveDir { path = "/data/nginx/html_wad"; } // {
+ # locations."/".extraConfig = "autoindex on; try_files $uri $uri/ /index.html;";
+ # };
+ # "wad-api.rory.gay" = import ./rory.gay/wad-api.nix;
+#
+ # "thearcanebrony.net" = import ./thearcanebrony.net/root.nix;
+ # "sentry.thearcanebrony.net" = import ./thearcanebrony.net/sentry.nix;
+ # "search.thearcanebrony.net" = import ./thearcanebrony.net/search.nix;
+#
+ # "rory.gay" = import ./rory.gay/root.nix;
+ # "lfs.rory.gay" = serveDir { path = "/data/nginx/html_lfs"; };
+#
+ # "awooradio.thearcanebrony.net" = import ./thearcanebrony.net/awooradio.nix;
+ # "cgit.rory.gay" = import ./rory.gay/cgit.nix;
+ # #"jitsi.rory.gay" = import ./rory.gay/jitsi.nix;
+#
+ # #matrix...
+ # "conduit.rory.gay" = import ./rory.gay/conduit.nix;
"matrix.rory.gay" = import ./rory.gay/matrix.nix;
- "pcpoc.rory.gay" = import ./rory.gay/pcpoc.nix;
- "matrixunittests.rory.gay" = import ./rory.gay/matrixunittests.nix;
- "conduit.matrixunittests.rory.gay" = import ./rory.gay/conduit.matrixunittests.nix;
- "mru.rory.gay" = import ./rory.gay/mru.nix;
- "ec.rory.gay" = import ./rory.gay/ec.nix;
-
- #bots...
- "0bottests.bots.rory.gay" = import ./rory.gay/bots.nix;
- "catnipbot.bots.rory.gay" = import ./rory.gay/bots.nix;
- "impulsyeeter.bots.rory.gay" = import ./rory.gay/bots.nix;
- "omnibot.bots.rory.gay" = import ./rory.gay/bots.nix;
- "yatopiawatchdog.bots.rory.gay" = import ./rory.gay/bots.nix;
- "playground.bots.rory.gay" = import ./rory.gay/bots.nix;
- "kinobot.bots.rory.gay" = import ./rory.gay/bots.nix;
- "siliconbotpublic.bots.rory.gay" = import ./rory.gay/bots.nix;
- "thearcanebot.bots.rory.gay" = import ./rory.gay/bots.nix;
- "anonbot.bots.rory.gay" = import ./rory.gay/bots.nix;
- "hericanbot.bots.rory.gay" = import ./rory.gay/bots.nix;
- "siliconbot.bots.rory.gay" = import ./rory.gay/bots.nix;
- "impulsbot.bots.rory.gay" = import ./rory.gay/bots.nix;
- "studiobot.bots.rory.gay" = import ./rory.gay/bots.nix;
- "carsnbots.bots.rory.gay" = import ./rory.gay/bots.nix;
- "binsh.bots.rory.gay" = import ./rory.gay/bots.nix;
- "fosscordbot.bots.rory.gay" = import ./rory.gay/bots.nix;
- "sugarcanebot.bots.rory.gay" = import ./rory.gay/bots.nix;
- "gradbot.bots.rory.gay" = import ./rory.gay/bots.nix;
+ # "pcpoc.rory.gay" = import ./rory.gay/pcpoc.nix;
+ # "matrixunittests.rory.gay" = import ./rory.gay/matrixunittests.nix;
+ # "conduit.matrixunittests.rory.gay" = import ./rory.gay/conduit.matrixunittests.nix;
+ # "mru.rory.gay" = import ./rory.gay/mru.nix;
+ # "ec.rory.gay" = import ./rory.gay/ec.nix;
+#
+ # #bots...
+ # "0bottests.bots.rory.gay" = import ./rory.gay/bots.nix;
+ # "catnipbot.bots.rory.gay" = import ./rory.gay/bots.nix;
+ # "impulsyeeter.bots.rory.gay" = import ./rory.gay/bots.nix;
+ # "omnibot.bots.rory.gay" = import ./rory.gay/bots.nix;
+ # "yatopiawatchdog.bots.rory.gay" = import ./rory.gay/bots.nix;
+ # "playground.bots.rory.gay" = import ./rory.gay/bots.nix;
+ # "kinobot.bots.rory.gay" = import ./rory.gay/bots.nix;
+ # "siliconbotpublic.bots.rory.gay" = import ./rory.gay/bots.nix;
+ # "thearcanebot.bots.rory.gay" = import ./rory.gay/bots.nix;
+ # "anonbot.bots.rory.gay" = import ./rory.gay/bots.nix;
+ # "hericanbot.bots.rory.gay" = import ./rory.gay/bots.nix;
+ # "siliconbot.bots.rory.gay" = import ./rory.gay/bots.nix;
+ # "impulsbot.bots.rory.gay" = import ./rory.gay/bots.nix;
+ # "studiobot.bots.rory.gay" = import ./rory.gay/bots.nix;
+ # "carsnbots.bots.rory.gay" = import ./rory.gay/bots.nix;
+ # "binsh.bots.rory.gay" = import ./rory.gay/bots.nix;
+ # "fosscordbot.bots.rory.gay" = import ./rory.gay/bots.nix;
+ # "sugarcanebot.bots.rory.gay" = import ./rory.gay/bots.nix;
+ # "gradbot.bots.rory.gay" = import ./rory.gay/bots.nix;
};
};
};
@@ -104,7 +104,7 @@ in
};
systemd.services.nginx.requires = [ "data.mount" ];
security.acme.acceptTerms = true;
- security.acme.defaults.email = "root@thearcanebrony.net";
+ security.acme.defaults.email = "root@rory.gay";
networking.hosts."127.0.0.1" = builtins.attrNames config.services.nginx.virtualHosts;
}
diff --git a/host/Rory-ovh/services/postgres.nix b/host/Rory-ovh/services/postgres.nix
index f0fb3e7..50dffa1 100755
--- a/host/Rory-ovh/services/postgres.nix
+++ b/host/Rory-ovh/services/postgres.nix
@@ -1,11 +1,11 @@
{ pkgs, ... }:
{
- systemd.tmpfiles.rules = [ "d /mnt/postgres/data 0750 postgres postgres" ];
+ systemd.tmpfiles.rules = [ "d /data/dedicated/postgres 0750 postgres postgres" ];
services.postgresql = {
enable = true;
- package = pkgs.postgresql_16_jit;
+ package = pkgs.postgresql_17_jit;
enableTCPIP = true;
authentication = pkgs.lib.mkOverride 10 ''
# TYPE, DATABASE, USER, ADDRESS, METHOD
@@ -21,7 +21,7 @@
# CREATE DATABASE nixcloud;
# GRANT ALL PRIVILEGES ON DATABASE nixcloud TO nixcloud;
# '';
- dataDir = "/mnt/postgres/data";
+ dataDir = "/data/dedicated/postgres";
settings = {
# https://pgconfigurator.cybertec.at/
max_connections = 2500;
|