This will build nixos and also the home-manager configuration as module.
build
to build the derivativeswitch
create new generation and switch to itboot
switch to it in the next boot
- machineName is defined at
flake.nix
nixos-rebuild build --flake ./#machineName
This will ask for sudo password multiple times ([sudo] password for user:
)
and after entering the correct password will say (Shared connection to <host_ip> closed.
).
This is not an error and it's working fine. (There might be a solution for this but idk)
nixos-rebuild build --flake ./#machineName --target-host user@host --use-remote-sudo
nixos-rebuild build --flake ./#machineName --build-host user@build-host --target-host user@host --use-remote-sudo