nixos.system.boot.kernel: stronger constraints for kernelParam type

Checks whether all spaces are inside double quotes, thus ensuring that one
string parses as no more than one kernel param.

Co-authored-by: pennae <82953136+pennae@users.noreply.github.com>
main
Vladimir Serov 3 years ago
parent f38ee4de53
commit a868222d65
No known key found for this signature in database
GPG Key ID: 08AA9711F8CD40CF
  1. 5
      nixos/modules/system/boot/kernel.nix

@ -83,7 +83,10 @@ in
};
boot.kernelParams = mkOption {
type = types.listOf types.str;
type = types.listOf (types.strMatching ''([^"[:space:]]|"[^"]*")+'' // {
name = "kernelParam";
description = "string, with spaces inside double quotes";
});
default = [ ];
description = "Parameters added to the kernel command line.";
};

Loading…
Cancel
Save