diff --git a/nixos/modules/image/repart-verity-store.nix b/nixos/modules/image/repart-verity-store.nix index 3cc52ff8f2f1..600e436a165d 100644 --- a/nixos/modules/image/repart-verity-store.nix +++ b/nixos/modules/image/repart-verity-store.nix @@ -89,6 +89,12 @@ in }; }; + fileSystems."/nix/store" = lib.mkDefault { + device = "/usr/nix/store"; + fsType = "none"; + options = [ "bind" ]; + }; + image.repart.partitions = { # dm-verity hash partition ${cfg.partitionIds.store-verity}.repartConfig = { diff --git a/nixos/tests/appliance-repart-image-verity-store.nix b/nixos/tests/appliance-repart-image-verity-store.nix index 39ebefa60eba..f5938bdc8424 100644 --- a/nixos/tests/appliance-repart-image-verity-store.nix +++ b/nixos/tests/appliance-repart-image-verity-store.nix @@ -18,18 +18,12 @@ { imports = [ ../modules/image/repart.nix ]; - virtualisation.fileSystems = lib.mkVMOverride { + virtualisation.fileSystems = lib.mkVMOverride { }; + fileSystems = { "/" = { fsType = "tmpfs"; options = [ "mode=0755" ]; }; - - # bind-mount the store - "/nix/store" = { - device = "/usr/nix/store"; - fsType = "none"; - options = [ "bind" ]; - }; }; image.repart = {