systemConfig="$(readlink -f ./result)"
nix-env -p /nix/var/nix/profiles/system --set "$systemConfig"
"$systemConfig/activate-user"
"$systemConfig/activate"
The following step will stop working eventually.
sh-3.2# "$systemConfig/activate-user"
warning: `activate-user` is deprecated and will be removed in 25.11
This is usually due to the use of a non‐standard activation/deployment
tool. If you maintain one of these tools, our advice is:
You can identify a post‐user‐activation configuration by the absence
of `activate-user` or the second line of the script being
`# nix-darwin: deprecated`.
We recommend running `$systemConfig/sw/bin/darwin-rebuild activate`
to activate built configurations; for a pre‐user‐activation
configuration this should be run as a normal user, and for a
post‐user‐activation configuration it should be run as `root`.
If you can’t or don’t want to use `darwin-rebuild activate`, then you
should skip running `activate-user` for post‐user‐activation
configurations and continue running `activate` as `root`.
In 25.11, `darwin-rebuild` will stop running `activate-user` and this
transition script will be deleted; you should be able to safely
remove all related logic by then.
Otherwise, you should report this to the deployment tool developers. If
you don’t use a third‐party deployment tool, please open a bug report
at <https://github.com/nix-darwin/nix-darwin/issues/new> and include as much
detail about your setup as possible.
In mosyle we're doing
The following step will stop working eventually.