Merge pull request #133625 from cab404/kernel-params-checking

nixos.system.boot.kernel: stronger constraints for kernelParam type
This commit is contained in:
Timothy DeHerrera 2021-10-15 16:24:12 -06:00 committed by GitHub
commit 0281ba6ace
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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.";
};