From e065cde3760230dcd654139f6d616525872483ce Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Mallo Date: Mon, 18 Sep 2023 19:27:14 +0200 Subject: [PATCH] Use NixOS attributes for the install section --- m/module/shared-nix-store.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/m/module/shared-nix-store.nix b/m/module/shared-nix-store.nix index a078a14..aa3420a 100644 --- a/m/module/shared-nix-store.nix +++ b/m/module/shared-nix-store.nix @@ -54,11 +54,15 @@ mountConfig = { LazyUnmount = true; }; + + # Run the unit after remote-fs-pre.target but before the remote-fs.target + after = [ "remote-fs-pre.target"]; + before = [ "umount.target" "remote-fs.target" ]; + # Install by using wantedBy over remote-fs.target + wantedBy = [ "remote-fs.target" ]; unitConfig = { # We need to wait for the NFS mount RequiresMountsFor = "/nix/store /mnt/hut-nix-store"; - RequiredBy = "remote-fs.target"; - Before = "remote-fs.target"; }; } ];