mirror of
https://github.com/ryan4yin/nixos-and-flakes-book.git
synced 2025-08-19 08:51:33 +02:00
feat: lib.optionals
This commit is contained in:
@@ -300,6 +300,8 @@ The disadvantage of this method is that all Nix modules that require conditional
|
||||
|
||||
The main advantage of this method is that it is much simpler than the methods previously introduced, requiring no modification to the module content, just using `lib.optionals` in `imports` to decide whether to import a module or not.
|
||||
|
||||
> Details about how `lib.optionals` works: <https://noogle.dev/f/lib/optionals>
|
||||
|
||||
Let's look at an example directly:
|
||||
|
||||
```nix
|
||||
|
Reference in New Issue
Block a user