setupSystemdUnits: use /nix/var/nix/profiles/default/lib/systemd/system as fallback

The previous commit stopped systemd from looking for system units in
/etc/systemd-mutable/system, which was a Dysnomia-specific path.

While this script doesn't seem to be used anywhere inside nixpkgs (also
not in the gone-since #110799 Dysnomia), its fallback mode (when
/etc/systemd/system is read-only) did write units to that
Dysnomia-specific path, which systemd now doesn't look at anymore.

It might be up for another debate on whether systems with read-only
/etc/systemd/system should probably just use /run/systemd/system, and
not some NixOS-specific paths, as such conditions can happen on other
distros too, but let's pick the other NixOS-specific path
/nix/var/nix/profiles/default/lib/systemd/system for now, which is
probably better than a path that surely is never looked at.

+1 -1
+1 -1
pkgs/build-support/setup-systemd-units.nix
··· 58 58 59 59 unitDir=/etc/systemd/system 60 60 if [ ! -w "$unitDir" ]; then 61 - unitDir=/etc/systemd-mutable/system 61 + unitDir=/nix/var/nix/profiles/default/lib/systemd/system 62 62 mkdir -p "$unitDir" 63 63 fi 64 64 declare -a unitsToStop unitsToStart