feat(lea): more tweaks
This commit is contained in:
parent
53d61c4f01
commit
4724e334bd
2 changed files with 29 additions and 16 deletions
|
@ -14,6 +14,8 @@
|
||||||
boot.loader.grub.device = "/dev/sdb";
|
boot.loader.grub.device = "/dev/sdb";
|
||||||
boot.loader.grub.useOSProber = true;
|
boot.loader.grub.useOSProber = true;
|
||||||
|
|
||||||
|
services.smartd.enable = true;
|
||||||
|
|
||||||
networking.hostName = "lea";
|
networking.hostName = "lea";
|
||||||
|
|
||||||
networking.networkmanager.enable = true;
|
networking.networkmanager.enable = true;
|
||||||
|
@ -22,18 +24,6 @@
|
||||||
|
|
||||||
i18n.defaultLocale = "en_GB.UTF-8";
|
i18n.defaultLocale = "en_GB.UTF-8";
|
||||||
|
|
||||||
i18n.extraLocaleSettings = {
|
|
||||||
LC_ADDRESS = "en_GB.UTF-8";
|
|
||||||
LC_IDENTIFICATION = "en_GB.UTF-8";
|
|
||||||
LC_MEASUREMENT = "en_GB.UTF-8";
|
|
||||||
LC_MONETARY = "en_GB.UTF-8";
|
|
||||||
LC_NAME = "en_GB.UTF-8";
|
|
||||||
LC_NUMERIC = "en_GB.UTF-8";
|
|
||||||
LC_PAPER = "en_GB.UTF-8";
|
|
||||||
LC_TELEPHONE = "en_GB.UTF-8";
|
|
||||||
LC_TIME = "en_GB.UTF-8";
|
|
||||||
};
|
|
||||||
|
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
layout = "gb";
|
layout = "gb";
|
||||||
xkbVariant = "";
|
xkbVariant = "";
|
||||||
|
@ -54,6 +44,7 @@
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
helix
|
helix
|
||||||
|
smartmontools
|
||||||
];
|
];
|
||||||
|
|
||||||
services.openssh.enable = true;
|
services.openssh.enable = true;
|
||||||
|
|
|
@ -1,16 +1,38 @@
|
||||||
{ config, pkgs, ... }: {
|
{ config, pkgs, ... }: {
|
||||||
services.postgresql = {
|
services.postgresql = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
package = pkgs.postgresql_14;
|
||||||
|
settings = {
|
||||||
|
max_connections = 200;
|
||||||
|
shared_buffers = "768MB";
|
||||||
|
effective_cache_size = "2304MB";
|
||||||
|
maintenance_work_mem = "192MB";
|
||||||
|
checkpoint_completion_target = 0.9;
|
||||||
|
wal_buffers = "16MB";
|
||||||
|
default_statistics_target = 100;
|
||||||
|
random_page_cost = 4;
|
||||||
|
effective_io_concurrency = 2;
|
||||||
|
work_mem = "1966kB";
|
||||||
|
huge_pages = false;
|
||||||
|
min_wal_size = "1GB";
|
||||||
|
max_wal_size = "4GB";
|
||||||
|
max_worker_processes = 4;
|
||||||
|
max_parallel_workers_per_gather = 2;
|
||||||
|
max_parallel_workers = 4;
|
||||||
|
max_parallel_maintenance_workers = 2;
|
||||||
|
};
|
||||||
ensureDatabases = [ "shorks-gay" ];
|
ensureDatabases = [ "shorks-gay" ];
|
||||||
enableTCPIP = true;
|
enableTCPIP = true;
|
||||||
dataDir = "/data/postgresql/${config.services.postgresql.package.psqlSchema}";
|
dataDir = "/data/postgresql/${config.services.postgresql.package.psqlSchema}";
|
||||||
authentication = pkgs.lib.mkOverride 10 ''
|
authentication = pkgs.lib.mkOverride 10 ''
|
||||||
#type database DBuser origin-address auth-method
|
#type database DBuser auth-method
|
||||||
|
local all all peer
|
||||||
|
#type database DBuser origin-address auth-method
|
||||||
# ipv4
|
# ipv4
|
||||||
host all all 127.0.0.1/32 trust
|
host all all 127.0.0.1/32 scram-sha-256
|
||||||
host all all 100.64.0.0/10 trust
|
host all all 100.64.0.0/10 scram-sha-256
|
||||||
# ipv6
|
# ipv6
|
||||||
host all all ::1/128 trust
|
host all all ::1/128 scram-sha-256
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue