1import ./make-test-python.nix ({ pkgs, lib, ... }:
2 # This is seperate from pgadmin4 since we don't want both running at once
3
4 {
5 name = "pgadmin4-standalone";
6 meta.maintainers = with lib.maintainers; [ mkg20001 ];
7
8 nodes.machine = { pkgs, ... }: {
9 environment.systemPackages = with pkgs; [
10 curl
11 ];
12
13 services.postgresql = {
14 enable = true;
15
16 authentication = ''
17 host all all localhost trust
18 '';
19
20 ensureUsers = [
21 {
22 name = "postgres";
23 ensurePermissions = {
24 "DATABASE \"postgres\"" = "ALL PRIVILEGES";
25 };
26 }
27 ];
28 };
29
30 services.pgadmin = {
31 enable = true;
32 initialEmail = "bruh@localhost.de";
33 initialPasswordFile = pkgs.writeText "pw" "bruh2012!";
34 };
35 };
36
37 testScript = ''
38 machine.wait_for_unit("postgresql")
39 machine.wait_for_unit("pgadmin")
40
41 machine.wait_until_succeeds("curl -s localhost:5050")
42 '';
43 })