nixos-rebuild?Yes, you can still use nixos-rebuild with clan!
Clan is built on top of standard NixOS and uses nixos-rebuild internally.
However, there are important considerations when using nixos-rebuild directly instead of clan machines update.
If your configuration uses clan vars, failing to run clan vars upload before nixos-rebuild will result in missing secrets and potentially broken services.
Clan automatically handles build host configuration based on your machine settings.
When using nixos-rebuild manually, you need to specify --build-host and --target-host options yourself.
Clan doesn't replace nixos-rebuild - it enhances it. When you run clan machines update, clan:
nixos-rebuild switch with the appropriate optionsUnder the hood, clan executes commands like:
nixos-rebuild switch --fast --build-host builtHost --flake /path/to/flake#machine-name clan vars uploadIf your clan configuration uses variables (vars) - generated secrets, keys, or configuration values - you must run clan vars upload before using nixos-rebuild directly.
clanModules with generated secrets (zerotier, borgbackup, etc.)When you want to use nixos-rebuild directly:
# Upload secret vars to the target machine
clan vars upload my-machine nixos-rebuild switch --flake .#my-machine --target-host root@target-ip --build-host local