From d4f57da9e85edc9d9fb00ce0b7f0906b78762659 Mon Sep 17 00:00:00 2001 From: Philip Taron Date: Thu, 30 Nov 2023 15:34:31 -0800 Subject: [PATCH] nixos/bcachefs: ensure correct ordering w.r.t. shutdown.target --- nixos/modules/tasks/filesystems/bcachefs.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nixos/modules/tasks/filesystems/bcachefs.nix b/nixos/modules/tasks/filesystems/bcachefs.nix index f28fd5cde9c1..2393b4c2462a 100644 --- a/nixos/modules/tasks/filesystems/bcachefs.nix +++ b/nixos/modules/tasks/filesystems/bcachefs.nix @@ -70,9 +70,10 @@ let value = { description = "Unlock bcachefs for ${fs.mountPoint}"; requiredBy = [ mountUnit ]; - before = [ mountUnit ]; - bindsTo = [ deviceUnit ]; after = [ deviceUnit ]; + before = [ mountUnit "shutdown.target" ]; + bindsTo = [ deviceUnit ]; + conflicts = [ "shutdown.target" ]; unitConfig.DefaultDependencies = false; serviceConfig = { Type = "oneshot";