diff --git a/systems/x86_64-linux/mx/default.nix b/systems/x86_64-linux/mx/default.nix index 493ee7a..3efb22c 100644 --- a/systems/x86_64-linux/mx/default.nix +++ b/systems/x86_64-linux/mx/default.nix @@ -118,6 +118,18 @@ }; wantedBy = [ "default.target" ]; }; + }; + + systemd.timers = { + check_boot = { + timerConfig = { + OnCalendar = "daily"; + }; + wantedBy = [ "timers.target" ]; + }; + }; + + systemd.services = { check_root = { serviceConfig = { Type = "oneshot"; @@ -128,7 +140,7 @@ THRESHOLD=85 if [ "$CURRENT" -gt "$THRESHOLD" ] ; then - ${pkgs.mailutils}/bin/mail -s '/ Disk Space Alert' harald << EOF + ${pkgs.mailutils}/bin/mail -s '/boot Disk Space Alert' harald << EOF Your root partition remaining free space is critically low. Used: $CURRENT% EOF fi @@ -140,12 +152,6 @@ }; systemd.timers = { - check_boot = { - timerConfig = { - OnCalendar = "daily"; - }; - wantedBy = [ "timers.target" ]; - }; check_root = { timerConfig = { OnCalendar = "daily"; diff --git a/systems/x86_64-linux/mx/mailserver.nix b/systems/x86_64-linux/mx/mailserver.nix index f934698..7dd0547 100644 --- a/systems/x86_64-linux/mx/mailserver.nix +++ b/systems/x86_64-linux/mx/mailserver.nix @@ -242,7 +242,8 @@ hostName = "webmail.hoyer.xyz"; plugins = [ "managesieve" ]; extraConfig = '' - # SSL/TLS needed for authentication, so the fqdn must match the certificate + # starttls needed for authentication, so the fqdn required to match + # the certificate $config['smtp_server'] = "ssl://${config.mailserver.fqdn}:465"; $config['smtp_user'] = "%u"; $config['smtp_pass'] = "%p"; diff --git a/systems/x86_64-linux/mx/postgresql.nix b/systems/x86_64-linux/mx/postgresql.nix index fac6f2b..584635f 100644 --- a/systems/x86_64-linux/mx/postgresql.nix +++ b/systems/x86_64-linux/mx/postgresql.nix @@ -8,33 +8,4 @@ services.postgresql = { package = pkgs.postgresql_14; }; - - # Temporary: upgrade script for PostgreSQL 14 → 16 migration. - # After upgrading, change package above to postgresql_16 and remove this block. - environment.systemPackages = [ - ( - let - newPostgres = pkgs.postgresql_16; - cfg = config.services.postgresql; - in - pkgs.writeScriptBin "upgrade-pg-cluster" '' - set -eux - systemctl stop postgresql - - export NEWDATA="/var/lib/postgresql/${newPostgres.psqlSchema}" - export NEWBIN="${newPostgres}/bin" - export OLDDATA="${cfg.dataDir}" - export OLDBIN="${cfg.finalPackage}/bin" - - install -d -m 0700 -o postgres -g postgres "$NEWDATA" - cd "$NEWDATA" - sudo -u postgres "$NEWBIN/initdb" -D "$NEWDATA" ${lib.escapeShellArgs cfg.initdbArgs} - - sudo -u postgres "$NEWBIN/pg_upgrade" \ - --old-datadir "$OLDDATA" --new-datadir "$NEWDATA" \ - --old-bindir "$OLDBIN" --new-bindir "$NEWBIN" \ - "$@" - '' - ) - ]; }