From f4f3f7d0ad49cfb9d73061997523f69c31716739 Mon Sep 17 00:00:00 2001 From: stuebinm Date: Sat, 1 Apr 2023 02:54:35 +0200 Subject: add module for crs-tracker, for fun please no one like, actually use this. unless you volunteer to at least add a script to run database migrations, since currently these need to be run by hand … --- ilex/configuration.nix | 33 +++++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-) (limited to 'ilex/configuration.nix') diff --git a/ilex/configuration.nix b/ilex/configuration.nix index 462cc3f..9b7f5fb 100644 --- a/ilex/configuration.nix +++ b/ilex/configuration.nix @@ -8,6 +8,7 @@ imports = [ ./hardware-configuration.nix ../modules/glitchtip.nix + ../modules/crs-tools.nix ]; networking.firewall.allowedTCPPorts = [ 5000 ]; @@ -34,7 +35,7 @@ services.postgresql = { enable = true; - ensureDatabases = [ "tracktrain" "glitchtrip" ]; + ensureDatabases = [ "tracktrain" "glitchtrip" "crstracker" ]; ensureUsers = [ { name = "tracktrain"; ensurePermissions = { @@ -45,25 +46,41 @@ ensurePermissions = { "DATABASE glitchtrip" = "ALL PRIVILEGES"; }; + } { + name = "crstracker"; + ensurePermissions = { + "DATABASE crstracker" = "ALL PRIVILEGES"; + }; } ]; authentication = '' local all all trust host all all 127.0.0.1/32 trust host all all ::1/127 trust ''; + package = pkgs.postgresql_11; }; - services.glitchtip = { - enable = true; - databaseUrl = "postgres://glitchtrip@localhost:5432/glitchtrip"; - }; - services.redis.servers.glitchtip = { + # services.glitchtip = { + # enable = true; + # databaseUrl = "postgres://glitchtrip@localhost:5432/glitchtrip"; + # }; + # services.redis.servers.glitchtip = { + # enable = true; + # port = 6379; + # }; + + services.crs-tracker = { enable = true; - port = 6379; + nginxVirtualHostConfig = { + listen = [{ + addr = "127.0.0.1"; + port = 8080; + ssl = false; + }]; + }; }; - services.tlp = { enable = true; settings = { -- cgit v1.2.3