Efficient NixOS Remote Deploys with Selective Closure Copying

Remote NixOS deploys get dramatically faster when the target host fetches public dependencies from its own substituters and you only push the private bits. The key is `--use-substitutes` and the trusted-user detail most guides skip.

Legacy Deployment with Nix Flake Apps and systemd User Services

One flake can handle both NixOS and plain Debian or Ubuntu deploys. Here's a practical pattern for embedding a full legacy deployment workflow into flake apps: setup, install, build, systemd user units, database dumps, REPL shells, and shell aliases.