Skip to content

Repository files navigation

My NixOS configurations for VPS

Steps to add a new server:

  1. Install Nix on target host with flakes enabled, and add substituters to /etc/nix/nix.conf

  2. Add a new configuration to this repo based on nixos-generate-config result on target host, with ssh and public keys configured, and adapt with preservation

  3. Create /etc/NIXOS and /nixos/etc/NIXOS on target host (also copy ssh keys here to prevent step 7?)

  4. Run sudo tar acvf boot.tar.gz /boot on target host, and backup boot.tar.gz locally

  5. nixos-rebuild boot --flake '.#<new_server>' --target-host <new_server> --substitute-on-destination

  6. Reboot target host

  7. Remove target host from ~/.ssh/known_hosts, because its keys are regenerated

  8. Reset root password for target host

  9. Use SSH port forwarding to configure Syncthing for the first time

ssh -L 18384:127.0.0.1:8384 <new_server> -N
  1. Set up Cloudflare Warp
warp-cli registration new
warp-cli mode proxy
warp-cli connect

About

My NixOS configuration files for VPS

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages