git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #108879 from kreisys/nixos-rebuild-no-systemctl

nixos-rebuild: Remove ambient systemctl dependency

commite7c8a73390fe721886d5f5995f67ea894613549d authorJörg Thalheim <Mic92@users.noreply.github.com> dateSun 7 Mar 2021, 14:09 (6 years ago) parent11728b54cf09dd
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