nixos/containers: check nixos-container names for underscores

This commit is contained in:
grindhold 2023-04-04 16:45:17 +02:00
parent f163eaf644
commit 108a6f181a

View File

@ -509,6 +509,12 @@ in
for details).
'';
}
{
assertion = !lib.strings.hasInfix "_" name;
message = ''
Names containing underscores are not allowed in nixos-containers. Please rename the container '${name}'
'';
}
];
};
};