diff --git a/modules/system/boot/systemd.nix b/modules/system/boot/systemd.nix index 0ccb30eb92f2..248dda60f59d 100644 --- a/modules/system/boot/systemd.nix +++ b/modules/system/boot/systemd.nix @@ -158,13 +158,6 @@ let KillSignal=SIGHUP ''; - fsTarget = - '' - [Unit] - Description=All File Systems - Wants=local-fs.target remote-fs.target - ''; - makeJobScript = name: content: "${pkgs.writeScriptBin name content}/bin/${name}"; unitConfig = { name, config, ... }: { @@ -423,7 +416,6 @@ in boot.systemd.units = { "rescue.service".text = rescueService; } - // { "fs.target" = { text = fsTarget; wantedBy = [ "multi-user.target" ]; }; } // mapAttrs' (n: v: nameValuePair "${n}.target" (targetToUnit n v)) cfg.targets // mapAttrs' (n: v: nameValuePair "${n}.service" (serviceToUnit n v)) cfg.services // mapAttrs' (n: v: nameValuePair "${n}.socket" (socketToUnit n v)) cfg.sockets; diff --git a/modules/tasks/filesystems.nix b/modules/tasks/filesystems.nix index 14abe22a2da7..8bc0b7531c0a 100644 --- a/modules/tasks/filesystems.nix +++ b/modules/tasks/filesystems.nix @@ -180,6 +180,12 @@ in target = "fstab"; }; + # Provide a target that pulls in all filesystems. + boot.systemd.targets.fs = + { description = "All File Systems"; + wants = [ "local-fs.target" "remote-fs.target" ]; + }; + /* jobs.mountall = { startOn = "started udev or config-changed";