mirror of
https://github.com/nix-community/flakelight.git
synced 2025-08-17 02:11:29 +02:00
Replace nixpkgs nullOr type with custom type
`nullOr`'s merge function requires definitions to all be null or all be non-null. It was being used where the intent was that null be used as a value representing unset, and as such the merge should return null if all definitions are null and ignore nulls otherwise. This adds a type with that merge semantics.
This commit is contained in:
@ -5,13 +5,13 @@
|
||||
{ config, lib, flakelight, moduleArgs, ... }:
|
||||
let
|
||||
inherit (lib) mkOption mkIf mkMerge;
|
||||
inherit (lib.types) lazyAttrsOf nullOr;
|
||||
inherit (flakelight.types) module optCallWith;
|
||||
inherit (lib.types) lazyAttrsOf;
|
||||
inherit (flakelight.types) module nullable optCallWith;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
nixosModule = mkOption {
|
||||
type = nullOr module;
|
||||
type = nullable module;
|
||||
default = null;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user