#+TITLE: Installation #+AUTHOR: Franck Cuny #+EMAIL: franck@fcuny.net * Darwin ** =agenix= Create SSH host keys with =sudo ssh-keygen -A=. You then need to add the public key (=/etc/ssh/ssh_host_ed25519_key.pub=) to [[file+emacs:../secrets/secrets.nix][secrets.nix]] and re-key the secrets, running =agenix -i ~/.ssh/agenix -r=. You can then validate that they key is encrypted properly with =sudo agenix -i /etc/ssh/ssh_host_ed25519_key -d ssh-remote-builder.age=. * Virtual machine running on the Synology NAS ** Creating the VM - chose VGA for the display (otherwise ~systemd-udevd~ gets stuck) ** Install NixOS on the VM 1. Boot to the installer 2. Copy the local configuration to the remote host ~rsync -avz --exclude='.git' --exclude='result' world/ nixos@192.168.1.151:~/world/~ 3. On the VM, from the =world= directory: 1. Run =sudo nix --experimental-features "nix-command flakes" run github:nix-community/disko/latest -- --mode destroy,format,mount nix/machines/vm-synology/disk.nix= 2. Run =nixos-install --root /mnt/ --flake .#vm-synology= 4. Reboot the VM