From 55b27365663d6761ea5ece113f5c2c26f299b529 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 14 Aug 2012 18:14:16 -0400 Subject: [PATCH] =?UTF-8?q?Add=20a=20target=20=E2=80=98fs.target=E2=80=99?= =?UTF-8?q?=20that=20waits=20for=20all=20filesystems?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/system/boot/systemd.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/system/boot/systemd.nix b/modules/system/boot/systemd.nix index 5f7ea7d3c9b5..6cd8b80f22ad 100644 --- a/modules/system/boot/systemd.nix +++ b/modules/system/boot/systemd.nix @@ -150,6 +150,13 @@ 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}"; serviceConfig = { name, config, ... }: { @@ -328,6 +335,7 @@ in boot.systemd.units = { "rescue.service".text = rescueService; } + // { "fs.target" = { text = fsTarget; wantedBy = [ "multi-user.target" ]; }; } // mapAttrs serviceToUnit cfg.services; };