Skip to content

Commit df8fbb4

Browse files
author
ismay
committed
Fix flake not accepting keyFile option
1 parent 83add3d commit df8fbb4

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

flake.nix

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@
7878
};
7979

8080
key = mkOption {
81-
type = types.str;
81+
type = types.nullOr types.str;
82+
default = null;
8283
description = "Obfuscation key (must match on both sides)";
8384
example = "your_secret_key";
8485
};
@@ -202,7 +203,7 @@
202203
}
203204
{
204205
assertion = all (inst:
205-
inst.enable -> (inst.key != "" || inst.keyFile != null)
206+
inst.enable -> (inst.key != null || inst.keyFile != null)
206207
) (attrValues cfg.instances);
207208
message = "Each enabled wg-obfuscator instance must have either 'key' or 'keyFile' set";
208209
}
@@ -263,7 +264,7 @@
263264
max-clients = ${toString inst.maxClients}
264265
idle-timeout = ${toString inst.idleTimeout}
265266
max-dummy = ${toString inst.maxDummy}
266-
'') (attrValues instances)
267+
'') instances
267268
)}
268269
EOF
269270

0 commit comments

Comments
 (0)