/etc/nixos is a real directory by default on NixOS. ln -sfn only replaces
an existing LINKNAME in place when it's already a symlink; against a plain
directory it instead creates the link *inside* it, leaving /etc/nixos
itself untouched. Confirmed live: /etc/nixos/nixos -> /var/lib/hermes/nixos
existed while /etc/nixos itself stayed a stray empty directory, so
`nix flake lock /etc/nixos` couldn't find a flake.nix. rm -rf first makes
this idempotent regardless of what currently occupies the path.