Merge branch 'main' into roles/minecraftserver

This commit is contained in:
2025-08-16 20:33:27 -07:00
2 changed files with 15 additions and 2 deletions

View File

@@ -64,6 +64,8 @@ in
max-jobs = 2;
};
nixpkgs.config.allowUnfree = true;
users.users.etorres = {
isNormalUser = true;
extraGroups = [ "wheel" ];

View File

@@ -13,7 +13,7 @@ with lib;
let
cfg = config.dbserver-postgresql;
defaultPostgresPackage = pkgs.postgresql;
defaultPostgresPackage = pkgsUnstable.postgresql;
defaultPsycopg2Package = pkgs.python313Packages.psycopg2;
in
{
@@ -40,8 +40,19 @@ in
enableTCPIP = true;
extensions =
pe: with pe; [
pgvector
vectorchord
];
initialScript = pkgs.writeText "initial-pg-script" ''
CREATE EXTENSION IF NOT EXISTS vchord CASCADE;
'';
settings = {
ssl = "off";
shared_preload_libraries = [ "vchord" ];
};
authentication = pkgs.lib.mkOverride 10 ''
@@ -54,7 +65,7 @@ in
environment.etc."alloy/postgresql.alloy".text = ''
prometheus.exporter.postgres "postgresql" {
data_source_names = ["postgresql://alloy:{{ postgres_role_alloy_pass }}@localhost:${config.services.postgresql.settings.port}/postgres?sslmode=disable"]
data_source_names = ["postgresql://alloy:{{ postgres_role_alloy_pass }}@localhost:${toString config.services.postgresql.settings.port}/postgres?sslmode=disable"]
autodiscovery {
enabled = true