pass rootOptions config as rootflags= kernel cmdline opt

This commit is contained in:
Daniel Barlow 2024-01-08 18:54:49 +00:00
parent 63f034e362
commit 228c0a1668
4 changed files with 17 additions and 3 deletions

View file

@ -47,6 +47,11 @@ in {
"ubifs"
];
};
rootOptions = mkOption {
type = types.nullOr types.str;
default = null;
};
boot = {
commandLine = mkOption {
type = types.listOf types.nonEmptyStr;
@ -95,7 +100,8 @@ in {
"root=${config.hardware.rootDevice}"
"rootfstype=${config.rootfsType}"
"fw_devlink=off"
];
] ++ lib.optional (config.rootOptions != null) "rootflags=${config.rootOptions}";
users.root = {
uid = 0; gid= 0; gecos = "Root of all evaluation";
dir = "/home/root/";