Skip to content

Commit

Permalink
services/apache: use a listOf which accepts non-list things
Browse files Browse the repository at this point in the history
Signed-off-by: magic_rb <[email protected]>
  • Loading branch information
MagicRB committed Dec 17, 2024
1 parent e825ea7 commit 41c0fe9
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion modules/services/nginx.nix
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,15 @@ in
type =
with lib.types;
let
optionalListOf = elemType:
let list = (types.listOf elemType);
in list // {
merge = loc: defs:
list.merge loc (map (x: if lib.isList x then x else lib.singleton x) defs);
check = lib.const true;
};
self =
(listOf (oneOf [
(optionalListOf (oneOf [
str
(attrsOf (oneOf [
str
Expand Down

0 comments on commit 41c0fe9

Please sign in to comment.