Go to file
2024-10-14 15:15:25 +00:00
patches Set primary and secondary colors for tango theme 2024-10-14 14:05:36 +00:00
.gitignore Initial 2023-01-09 13:13:56 +00:00
branding.nix Fix branding generation 2023-01-10 21:42:20 +00:00
configuration.nix Set postgresql max_wal_size to 4GB 2024-09-10 07:22:15 +00:00
disable-services.nix Fix sidekiq service name 2023-04-20 17:21:40 +00:00
LICENSE Initial 2023-01-09 13:13:56 +00:00
mastodon.nix Enable search 2024-10-14 15:15:25 +00:00
README.md Typo 2024-06-28 22:22:08 +00:00
secrets.nix.example remove external auth service 2024-08-12 13:35:56 +00:00

lor.sh

Migration notes

  1. Use the unstable channel.

  2. Prepare the new machine (man nixos)

git clone https://code.dumpstack.io/infra/lor.sh.git /mnt/etc/nixos
nixos-generate-config --root /mnt
sed -i 's/imports = \[/imports = \[\n.\/disable-services.nix/' /mnt/etc/nixos/configuration.nix
vim /mnt/etc/nixos/secrets.nix
nixos-install --no-root-password
reboot
  1. Change DNS A record

  2. Dump the database on the old machine

systemctl stop 'mastodon-*'
su - mastodon
pg_dump -Fc mastodon_production -f backup.dump
  1. Load the database and start the server
sudo -u mastodon pg_restore -Fc -U mastodon -n public --no-owner --role=mastodon -d mastodon backup.dump
sed -i '/disable-services/d' /etc/nixos/configuration.nix
nixos-rebuild switch
sudo -u mastodon mastodon-tootctl feeds build