From 1a490a14e591406ef06517a1e16675572e0e8e95 Mon Sep 17 00:00:00 2001 From: Arian van Putten Date: Thu, 16 Apr 2026 17:29:15 +0200 Subject: [PATCH] nixos/image/repart-verity-store: mount nix-store in the module You always need this for the image to be bootable so lets do it in the image and not in the test --- nixos/modules/image/repart-verity-store.nix | 6 ++++++ nixos/tests/appliance-repart-image-verity-store.nix | 10 ++-------- 2 files changed, 8 insertions(+), 8 deletions(-) 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 = {