Unverified Commit a868222d authored by Vladimir Serov's avatar Vladimir Serov
Browse files

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: default avatarpennae <82953136+pennae@users.noreply.github.com>
parent f38ee4de
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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.";
    };