Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
nixos/storage: Switch to a new mkDeviceSpecOption
Having just a single type for a device specification doesn't work out well if we want to have an apply function, which we do want, because it makes more sense if we want to resolve such a device specification without using builtins.match all over the place. It also improves a lot in readability of the option descriptions, because every such option now has not only a description of what a device specification is but also lists the valid types for the device specification. This has another advantage that instead for something like the following: Type: list of device specification of <type>.<name>s The type description is now just: Type: list of device specifications We're also heading for more consistency, speaking about "device specification" or shortly "devspec". Say if we have something like "storage.foo.bar", "foo.bar" is the "device specification" and "foo" is the "device specification type" and "bar" is the "device specification name". Signed-off-by: aszlig <aszlig@redmoonstudios.org>
- Loading branch information
Showing
2 changed files
with
49 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters