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:
@@ -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}
|
||||
|
||||
|
||||
@@ -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";
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user