mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-04-13 10:07:29 +00:00
etc-overlay: mount the metadata image read-only (#360756)
This commit is contained in:
commit
1ac98af94b
@ -36,7 +36,7 @@
|
||||
where = "/run/etc-metadata";
|
||||
what = "/etc-metadata-image";
|
||||
type = "erofs";
|
||||
options = "loop";
|
||||
options = "loop,ro";
|
||||
unitConfig = {
|
||||
# Since this unit depends on the nix store being mounted, it cannot
|
||||
# be a dependency of local-fs.target, because if it did, we'd have
|
||||
|
@ -232,7 +232,7 @@ in
|
||||
echo "remounting /etc..."
|
||||
|
||||
tmpMetadataMount=$(mktemp --directory -t nixos-etc-metadata.XXXXXXXXXX)
|
||||
mount --type erofs ${config.system.build.etcMetadataImage} $tmpMetadataMount
|
||||
mount --type erofs -o ro ${config.system.build.etcMetadataImage} $tmpMetadataMount
|
||||
|
||||
# Mount the new /etc overlay to a temporary private mount.
|
||||
# This needs the indirection via a private bind mount because you
|
||||
|
Loading…
Reference in New Issue
Block a user