@@ -300,13 +300,14 @@ let
300300 };
301301 regex = mkOption {
302302 type = types.str;
303+ default = "(.*)";
303304 description = ''
304305 Regular expression against which the extracted value is matched.
305306 '';
306307 };
307308 replacement = mkOption {
308309 type = types.str;
309− default = "";
310+ default = "$1";
310311 description = ''
311312 Replacement value against which a regex replace is performed if the
312313 regular expression matches.
@@ -314,6 +315,7 @@ let
314315 };
315316 action = mkOption {
316317 type = types.enum ["replace" "keep" "drop"];
318+ default = "replace";
317319 description = ''
318320 Action to perform based on regex matching.
319321 '';