Update installation instructions

restic-rest-server
Simon Bruder 2020-10-16 15:31:37 +02:00
parent 84ad07f5f2
commit 4a22d7f9af
No known key found for this signature in database
GPG Key ID: 6F03E0000CC5B62F
1 changed files with 12 additions and 17 deletions

View File

@ -55,37 +55,32 @@ repository to your new home directory (e.g. `/mnt/home/simon/nixos`).
Add a symlink as the global configuration
sudo mkdir -p /mnt/etc/nixos/
sudo ln -s /mnt/home/simon/nixos/machines/nunotaba/configuration.nix /mnt/etc/nixos/configuration.nix
sudo ln -s ../../home/simon/nixos/machines/nunotaba/configuration.nix /mnt/etc/nixos/configuration.nix
Generate hardware configuration and copy hardware configuration to machine
configuration
sudo nixos-generate-config --root /mnt/
sudo cp /mnt/etc/nixos/hardware-configuration.nix /mnt/home/simon/nixos/machines/nunotaba/hardware-configuration.nix
Install NixOS and reboot (if you do not have another machine, omit
`--no-root-passwd`)
sudo mv /mnt/etc/nixos/hardware-configuration.nix /mnt/home/simon/nixos/machines/nunotaba/hardware-configuration.nix
sudo ln -s ../../home/simon/nixos/machines/nunotaba/hardware-configuration.nix /mnt/etc/nixos/hardware-configuration.nix
Install NixOS
sudo nixos-install --no-root-passwd
sudo reboot
**Hint**: If you need to reboot to the installation system because something
didnt work, first open the luks partition like in the setup script, run `sudo
vgchange -ay` to scan for LVM VGs and then mount the other filesystems like in
the script.
Enter the target as a container, set a user password and clone the dotfiles
SSH into the machine (or login locally if you set a root password), set a user
password and clone the dotfiles
ssh root@machine
rm /etc/nixos/configuration.nix
sudo cp /etc/resolv.conf /mnt/etc/ # see https://github.com/NixOS/nixpkgs/issues/39665
nixos-enter
passwd simon
^D
ssh simon@machine
su simon
# press “q” to get rid of zsh-newuser-install
git clone https://github.com/andsens/homeshick.git $HOME/.homesick/repos/homeshick
source $HOME/.homesick/repos/homeshick/homeshick.sh
homeshick clone https://git.sbruder.de/simon/dotfiles
^D # user
^D # nixos-enter
sudo rm /mnt/etc/resolv.conf
reboot
## How to add new device