diff --git a/ops/nixos/porcorosso/default.nix b/ops/nixos/porcorosso/default.nix index 8d60be318c..88e6ada0da 100644 --- a/ops/nixos/porcorosso/default.nix +++ b/ops/nixos/porcorosso/default.nix @@ -296,16 +296,18 @@ in { what = "/persist${dir}"; where = dir; }; - bindMountSvc = dir: svc: (bindMount' dir) // { + bindMountSvc = dir: svc: target: (bindMount' dir) // { bindsTo = [svc]; partOf = [svc]; + before = [svc]; + wantedBy = [target]; }; bindMount = dir: (bindMount' dir) // { wantedBy = ["multi-user.target"]; }; in [ - (bindMountSvc "/var/lib/libvirt" "libvirtd.service") - (bindMountSvc "/etc/NetworkManager/system-connections" "NetworkManager.service") + (bindMountSvc "/var/lib/libvirt" "libvirtd.service" "multi-user.target") + (bindMountSvc "/etc/NetworkManager/system-connections" "NetworkManager.service" "network.target") (bindMount "/root") ];