From 320c58ce483f23da692106d8c4eddf3ac8756912 Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Mallo Date: Mon, 18 Sep 2023 13:57:41 +0200 Subject: [PATCH] Prevent the overlay to be mounted in stage1 --- m/module/shared-nix-store.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/m/module/shared-nix-store.nix b/m/module/shared-nix-store.nix index 72ece72..225bdc0 100644 --- a/m/module/shared-nix-store.nix +++ b/m/module/shared-nix-store.nix @@ -20,7 +20,9 @@ # layer the disk nix store. The destination is still the nix store in # /nix/store (confusing). We need rw access, as the daemon need to write the # lock files to build derivations locally. - fileSystems."/nix/store" = { + # HACK: Use /nix//store to prevent the overlay to be mounted on boot, see: + # https://github.com/NixOS/nixpkgs/blob/17a46d09ac123d0da3a26855bf3af7db01f9c751/nixos/lib/utils.nix#L14 + fileSystems."/nix//store" = { device = "overlay"; fsType = "overlay"; options = [ "lowerdir=/mnt/hut-nix-store,upperdir=/nix/store,workdir=/mnt/nix-work" ];