You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
1 month ago | |
---|---|---|
auth | 5 months ago | |
patches | 4 months ago | |
.gitignore | 5 months ago | |
LICENSE | 5 months ago | |
README.md | 3 months ago | |
branding.nix | 5 months ago | |
configuration.nix | 5 months ago | |
disable-services.nix | 1 month ago | |
mastodon.nix | 1 month ago | |
secrets.nix.example | 5 months ago |
README.md
lor.sh
Installation notes
-
Use the unstable channel.
-
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
-
Change DNS A record
-
Dump the database on the old machine
systemctl stop 'mastodon-*'
su - mastodon
pg_dump -Fc mastodon_production -f backup.dump
- 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
su - mastodon -s "$(which bash)" -c 'mastodon-env tootctl feeds build'