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

The `boot.readOnlyNixStore` option can be removed,
now that the more flexible `boot.nixStoreMountOpts` option exists.
This commit is contained in:
Grimmauld
2025-05-18 12:08:03 +02:00
parent 1b18ff3669
commit aa3e5a2738
2 changed files with 11 additions and 16 deletions
+1 -1
View File
@@ -9,7 +9,7 @@
<!-- 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
View File
@@ -39,6 +39,16 @@ let
in
{
imports = [
(lib.mkRemovedOptionModule
[
"boot"
"readOnlyNixStore"
]
"Please use the `boot.nixStoreMountOpts' option to define mount options for the Nix store, including 'ro'"
)
];
options = {
boot = {
@@ -52,17 +62,6 @@ in
'';
};
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.
'';
};
nixStoreMountOpts = mkOption {
type = types.listOf types.nonEmptyStr;
default = [
@@ -103,9 +102,5 @@ in
config = {
system.build.bootStage2 = bootStage2;
boot.nixStoreMountOpts = [
"nodev"
"nosuid"
] ++ lib.optional config.boot.readOnlyNixStore "ro";
};
}