nixos/stage-2-init: remove 'readOnlyNixStore' option

The `boot.readOnlyNixStore` option can be removed,
now that the more flexible `boot.nixStoreMountOpts` option exists.

Grimmauld aa3e5a27 1b18ff36

Changed files
+11 -16
doc
release-notes
nixos
modules
system
+1 -1
doc/release-notes/rl-2511.section.md
···
<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
-
- Create the first release note entry in this section!
+
- The `boot.readOnlyNixStore` has been removed. Control over bind mount options on `/nix/store` is now offered by the `boot.nixStoreMountOpts` option.
## Other Notable Changes {#sec-nixpkgs-release-25.11-notable-changes}
+10 -15
nixos/modules/system/boot/stage-2.nix
···
in
{
+
imports = [
+
(lib.mkRemovedOptionModule
+
[
+
"boot"
+
"readOnlyNixStore"
+
]
+
"Please use the `boot.nixStoreMountOpts' option to define mount options for the Nix store, including 'ro'"
+
)
+
];
+
options = {
boot = {
···
type = types.lines;
description = ''
Shell commands to be executed just before systemd is started.
-
'';
-
};
-
-
readOnlyNixStore = mkOption {
-
type = types.bool;
-
default = true;
-
description = ''
-
If set, NixOS will enforce the immutability of the Nix store
-
by making {file}`/nix/store` a read-only bind
-
mount. Nix will automatically make the store writable when
-
needed.
'';
};
···
config = {
system.build.bootStage2 = bootStage2;
-
boot.nixStoreMountOpts = [
-
"nodev"
-
"nosuid"
-
] ++ lib.optional config.boot.readOnlyNixStore "ro";
};
}