diff --git a/hosts/marvin/services/postgres.nix b/hosts/marvin/services/postgres.nix index 267749dd..3ee1be90 100644 --- a/hosts/marvin/services/postgres.nix +++ b/hosts/marvin/services/postgres.nix @@ -1,7 +1,7 @@ -{ pkgs, config, ... }: -let - cfg = config.services.postgresql; -in +{ pkgs, ... }: +# let +# cfg = config.services.postgresql; +# in { services.postgresql = { enable = true; @@ -28,23 +28,23 @@ in 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"; + # }; + # }; }