mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-10 19:55:41 +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, ... }: {
|
||||
|
||||
options = {
|
||||
enable = mkEnableOption "the filesystem mount" // {
|
||||
default = true;
|
||||
};
|
||||
|
||||
mountPoint = mkOption {
|
||||
example = "/mnt/usb";
|
||||
type = nonEmptyWithoutTrailingSlash;
|
||||
|
@ -234,6 +238,7 @@ in
|
|||
}
|
||||
'';
|
||||
type = types.attrsOf (types.submodule [coreFileSystemOpts fileSystemOpts]);
|
||||
apply = lib.filterAttrs (_: fs: fs.enable);
|
||||
description = ''
|
||||
The file systems to be mounted. It must include an entry for
|
||||
the root directory (`mountPoint = "/"`). Each
|
||||
|
@ -280,6 +285,7 @@ in
|
|||
boot.specialFileSystems = mkOption {
|
||||
default = {};
|
||||
type = types.attrsOf (types.submodule coreFileSystemOpts);
|
||||
apply = lib.filterAttrs (_: fs: fs.enable);
|
||||
internal = true;
|
||||
description = ''
|
||||
Special filesystems that are mounted very early during boot.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue