Set password (using
passwd
) forroot
first
nix run github:nix-community/nixos-anywhere -- --flake github:songpola/nixos-config#<hostname> root@<host>
nh os switch
sudo nixos-rebuild switch --flake github:songpola/nixos-config
- Add
--build-host <user>@<host>
flag to build on remote host - Add
--use-remote-sudo
flag if use non-root user - Add
--use-substitutes
flag to speed up if the remote host is faster
nixos-rebuild --flake github:songpola/nixos-config --target-host <user>@<host> switch
pnpm env use --global lts