My Nix Configuration

[hosts.marvin] disable pg autovacuum service

Changed files
+23 -23
hosts
marvin
services
+23 -23
hosts/marvin/services/postgres.nix
···
-
{ pkgs, config, ... }:
-
let
-
cfg = config.services.postgresql;
-
in
+
{ pkgs, ... }:
+
# let
+
# cfg = config.services.postgresql;
+
# in
{
services.postgresql = {
enable = true;
···
max_parallel_maintenance_workers = 4;
};
};
-
systemd.timers.pg-autovacuum = {
-
description = "Timer for Postgres Autovacuum";
-
timerConfig = {
-
OnCalendar = "*-*-* 01:00:00";
-
Unit = "pg-autovacuum.service";
-
};
-
};
-
systemd.services.pg-autovacuum = {
-
description = "Vacuum all Postgres databases.";
-
requisite = [ "postgresql.service" ];
-
wantedBy = [ "multi-user.target" ];
-
serviceConfig = {
-
Type = "oneshot";
-
User = "postgres";
-
Group = "postgres";
-
SyslogIdentifier = "pg-autovacuum";
-
ExecStart = "${cfg.package}/bin/vacuumdb --all --echo --jobs=6 --parallel=5 --analyze --verbose";
-
};
-
};
+
# systemd.timers.pg-autovacuum = {
+
# description = "Timer for Postgres Autovacuum";
+
# timerConfig = {
+
# OnCalendar = "*-*-* 01:00:00";
+
# Unit = "pg-autovacuum.service";
+
# };
+
# };
+
# systemd.services.pg-autovacuum = {
+
# description = "Vacuum all Postgres databases.";
+
# requisite = [ "postgresql.service" ];
+
# wantedBy = [ "multi-user.target" ];
+
# serviceConfig = {
+
# Type = "oneshot";
+
# User = "postgres";
+
# Group = "postgres";
+
# SyslogIdentifier = "pg-autovacuum";
+
# ExecStart = "${cfg.package}/bin/vacuumdb --all --echo --jobs=6 --parallel=5 --analyze --verbose";
+
# };
+
# };
}