From f58ed2f368104dff027f31c871fa265ca41c0903 Mon Sep 17 00:00:00 2001 From: diced Date: Thu, 31 Jul 2025 23:22:06 -0700 Subject: [PATCH] fix: add minio to flake --- flake.nix | 46 ++++++++++++++++++++++++++++++---------------- 1 file changed, 30 insertions(+), 16 deletions(-) diff --git a/flake.nix b/flake.nix index f898d884..2aa32cf5 100644 --- a/flake.nix +++ b/flake.nix @@ -65,10 +65,14 @@ scripts = { pgup.exec = '' - process-compose -D + process-compose up postgres -D ''; - pgdown.exec = '' + minioup.exec = '' + process-compose up minio -D + ''; + + downall.exec = '' process-compose down ''; @@ -90,23 +94,33 @@ corepack.enable = true; }; - services.postgres = { - enable = true; - package = pkgs.postgresql_17; + services = { + postgres = { + enable = true; + package = pkgs.postgresql_17; - initialScript = '' - CREATE ROLE "${psqlConfig.username}" WITH LOGIN PASSWORD '${psqlConfig.password}' SUPERUSER; - ''; + initialScript = '' + CREATE ROLE "${psqlConfig.username}" WITH LOGIN PASSWORD '${psqlConfig.password}' SUPERUSER; + ''; - initialDatabases = [ - { - name = psqlConfig.database; - user = psqlConfig.username; - } - ]; + initialDatabases = [ + { + name = psqlConfig.database; + user = psqlConfig.username; + } + ]; - listen_addresses = "0.0.0.0"; - port = 5432; + listen_addresses = "0.0.0.0"; + port = 5432; + }; + + minio = { + enable = true; + }; + }; + + process.managers.process-compose = { + tui.enable = false; }; }; };