mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-13 05:05:29 +03:00
nixos/fileSystems: add enable option (#301915)
This commit is contained in:
commit
764082c095
1 changed files with 6 additions and 0 deletions
|
@ -32,6 +32,10 @@ let
|
||||||
coreFileSystemOpts = { name, config, ... }: {
|
coreFileSystemOpts = { name, config, ... }: {
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
|
enable = mkEnableOption "the filesystem mount" // {
|
||||||
|
default = true;
|
||||||
|
};
|
||||||
|
|
||||||
mountPoint = mkOption {
|
mountPoint = mkOption {
|
||||||
example = "/mnt/usb";
|
example = "/mnt/usb";
|
||||||
type = nonEmptyWithoutTrailingSlash;
|
type = nonEmptyWithoutTrailingSlash;
|
||||||
|
@ -234,6 +238,7 @@ in
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
type = types.attrsOf (types.submodule [coreFileSystemOpts fileSystemOpts]);
|
type = types.attrsOf (types.submodule [coreFileSystemOpts fileSystemOpts]);
|
||||||
|
apply = lib.filterAttrs (_: fs: fs.enable);
|
||||||
description = ''
|
description = ''
|
||||||
The file systems to be mounted. It must include an entry for
|
The file systems to be mounted. It must include an entry for
|
||||||
the root directory (`mountPoint = "/"`). Each
|
the root directory (`mountPoint = "/"`). Each
|
||||||
|
@ -280,6 +285,7 @@ in
|
||||||
boot.specialFileSystems = mkOption {
|
boot.specialFileSystems = mkOption {
|
||||||
default = {};
|
default = {};
|
||||||
type = types.attrsOf (types.submodule coreFileSystemOpts);
|
type = types.attrsOf (types.submodule coreFileSystemOpts);
|
||||||
|
apply = lib.filterAttrs (_: fs: fs.enable);
|
||||||
internal = true;
|
internal = true;
|
||||||
description = ''
|
description = ''
|
||||||
Special filesystems that are mounted very early during boot.
|
Special filesystems that are mounted very early during boot.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue