git.iko.soy/typeable/nixpkgs
on master help sign in
Remove unnecessary check that uses systemctl

The use of systemctl makes this incompatible with darwin even though building/deploying a nixos closure from darwin is a perfectly valid use case. NIX_DAEMON is pretty much unnecessary nowadays as nix uses other indicators for deciding whether to use the daemon or not.

commit4cf09dd98c40a7d02de773bf503a72700f60bc7c authorShay Bergmann <sbergmann@kreisys.co> dateThu 22 Oct 2020, 06:23 (6 years ago) parenteeea7b1
1 file changed−14
pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh−14
pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh−14
@@ -325,20 +325,6 @@ cleanup() {
325325trap cleanup EXIT
326326
327327
328−
329−# If the Nix daemon is running, then use it. This allows us to use
330−# the latest Nix from Nixpkgs (below) for expression evaluation, while
331−# still using the old Nix (via the daemon) for actual store access.
332−# This matters if the new Nix in Nixpkgs has a schema change. It
333−# would upgrade the schema, which should only happen once we actually
334−# switch to the new configuration.
335−# If --repair is given, don't try to use the Nix daemon, because the
336−# flag can only be used directly.
337−if [ -z "$repair" ] && systemctl show nix-daemon.socket nix-daemon.service | grep -q ActiveState=active; then
338− export NIX_REMOTE=${NIX_REMOTE-daemon}
339−fi
340−
341−
342328# First build Nix, since NixOS may require a newer version than the
343329# current one.
344330if [ -n "$rollback" -o "$action" = dry-build ]; then