Skip to content

Commit

Permalink
chore(lib): improve mergeEnums (#400)
Browse files Browse the repository at this point in the history
  • Loading branch information
PerchunPak authored Dec 10, 2024
1 parent a817009 commit 2319182
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions modules/lib/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,7 @@ in

# a -> a -> a
# see https://nlewo.github.io/nixos-manual-sphinx/development/option-types.xml.html
# by default enums cannot be merged, but they keep their passed value in `functor.payload`.
# `functor.binOp` can merge those values
mergeEnums = a: b: lib.types.enum (a.functor.binOp a.functor.payload b.functor.payload);
mergeEnums = a: b: a.typeMerge b.functor;

# string
# returns the current release version of nixos or home-manager. throws an evaluation error if neither are
Expand Down

0 comments on commit 2319182

Please sign in to comment.