ADD pgadmin4

warning : initial setup failed. You must execute initial script in
manual mode, and restart service
This commit is contained in:
Alexandre LUCAZEAU 2022-07-21 08:06:59 +00:00
parent f2f069251c
commit 7628e65db6
4 changed files with 22 additions and 1 deletions

View File

@ -20,5 +20,9 @@
owner = "nextcloud";
group = "nextcloud";
};
age.secrets.secret_pgadmin = {
file = ./secrets/pgadmin.age;
path = "/run/pgadmin";
};
}

View File

@ -1,10 +1,11 @@
{config, pkgs, ...}:
{
networking.firewall.allowedTCPPorts = [ 5432 ];
networking.firewall.allowedTCPPorts = [ 5432 5050 ];
# Enable PostgreSQL
services.postgresql = {
enable = true;
enableTCPIP = true;
authentication = "host all all 192.168.0.0/16 trust";
# Ensure the database, user, and permissions always exist
@ -15,5 +16,11 @@ networking.firewall.allowedTCPPorts = [ 5432 ];
}
];
};
services.pgadmin = {
openFirewall = true;
enable = true;
initialEmail = "pizzajoffre@gmail.com";
initialPasswordFile = /run/pgadmin;
};
}

View File

@ -0,0 +1,7 @@
age-encryption.org/v1
-> ssh-ed25519 AsRWPA vJ7KcVXhCCcq0Mk4aBaM5LoA9gF6WOdDzTChwbkelkM
YdTT5zQt6gQobb50qs6nCXokOqW7+ZM5trmp6ld034M
-> (GBiT\-grease (e <?VOv
cEKrUoJR
--- EDtW17elIqlxfU+8oIWtEGKdQ1DS1ANNAbC96WAPt3s
½6Þ‰ö³açk_ŽOÄô¯`<60>öÝ+ ò°ÑÚÏI¿ô§&ÒË

View File

@ -1,12 +1,15 @@
let
nextcloud-db = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGgO3EpoG14fn0VYC69sSS0iI5ZEB4qx9adFS+L5U5ZB";
nextcloud-admin = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGgO3EpoG14fn0VYC69sSS0iI5ZEB4qx9adFS+L5U5ZB";
pgadmin = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGgO3EpoG14fn0VYC69sSS0iI5ZEB4qx9adFS+L5U5ZB";
restic = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGgO3EpoG14fn0VYC69sSS0iI5ZEB4qx9adFS+L5U5ZB";
users_nextcloud = [ nextcloud-db nextcloud-admin ];
users_backup = [ restic ];
users_postgresl = [ pgadmin ];
in
{
"nextcloud-db-pass.age".publicKeys = users_nextcloud;
"nextcloud-admin-pass.age".publicKeys = users_nextcloud;
"secret_restic.age".publicKeys = users_backup;
"pgadmin.age".publicKeys = users_postgresl;
}