Upgrade to NixOS 23.05 and SSD boot

This commit is contained in:
2023-06-08 18:30:16 +02:00
parent 95a024a6e7
commit 110a98c3d4
14 changed files with 107 additions and 117 deletions

View File

@@ -20,32 +20,34 @@
** Installation
1. Download the sdcard image
2. Connect a keyboard to the Raspberry Pi and set the password
2. Use initial config file
#+begin_src shell
passwd
sudo su
passwd
cp install.nix configuration.nix
#+end_src
The default user is nixos
3. Move the repo to the server and the agenix key
#+begin_src shell
scp -R Projects/zion zion:/home/nixos/system
scp -r Projects/zion zion:/home/nixos/system
scp .ssh/zion root@zion:/etc/ssh/id_ed25519
#+end_src
4. Rebuild the system using Flakes
4. Mount the firmware partition
#+begin_src shell
mount /dev/mmcblk1p1 /boot
#+end_src
5. Rebuild the system using Flakes
#+begin_src shell
nix-shell -p git
sudo nixos-rebuild switch --flake /home/nixos/system#zion --impure
sudo nixos-rebuild switch --flake /home/nixos/system#zion
#+end_src
5. Restore the SQL databases
6. Restore the SQL databases
#+begin_src shell
psql -U postgres -f /vault/backups/zion/databases/all.sql
gunzip -c /vault/backups/zion/databases/all.sql.gz | psql -U postgres
#+end_src