mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-20 19:16:11 +00:00
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>
This commit is contained in:
parent
f38ee4de53
commit
a868222d65
@ -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…
Reference in New Issue
Block a user