add database host
This commit is contained in:
parent
05107c025f
commit
cdaf4de6e5
5 changed files with 58 additions and 22 deletions
35
nixos/hosts/hades/database/configuration.nix
Normal file
35
nixos/hosts/hades/database/configuration.nix
Normal file
|
@ -0,0 +1,35 @@
|
|||
{ config, pkgs, ... }:
|
||||
let vs = config.vault-secrets.secrets;
|
||||
in {
|
||||
networking.interfaces.eth0.useDHCP = true;
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ config.services.postgresql.port ];
|
||||
|
||||
vault-secrets.secrets.database = {
|
||||
user = "postgres";
|
||||
group = "postgres";
|
||||
};
|
||||
|
||||
services.postgresql = {
|
||||
enable = true;
|
||||
package = pkgs.postgresql_13;
|
||||
enableTCPIP = true;
|
||||
extraPlugins = [ ];
|
||||
initdbArgs = [
|
||||
"--encoding 'UTF-8'"
|
||||
"--lc-collate='en_US.UTF-8'"
|
||||
"--lc-ctype='en_US.UTF-8'"
|
||||
];
|
||||
authentication = ''
|
||||
host all all 192.168.0.1/23 md5
|
||||
host all all 10.10.10.0/24 md5
|
||||
'';
|
||||
initialScript = "${vs.database}/initialScript";
|
||||
settings = {
|
||||
shared_preload_libraries = "pg_stat_statements";
|
||||
"pg_stat_statements.track" = "all";
|
||||
"pg_stat_statements.max" = 10000;
|
||||
track_activity_query_size = 2048;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -121,7 +121,6 @@
|
|||
hostname = "database";
|
||||
ip = "192.168.0.126";
|
||||
mac = "82:e8:71:7f:37:b4";
|
||||
nix = false;
|
||||
}
|
||||
{
|
||||
hostname = "dn42";
|
||||
|
|
|
@ -98,6 +98,7 @@ in {
|
|||
package = pkgs.gitAndTools.gitFull;
|
||||
userName = "Victor";
|
||||
userEmail = "victor@xirion.net";
|
||||
lfs.enable = true;
|
||||
};
|
||||
|
||||
programs.mako = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue