Merge pull request #224666 from grindhold/container_underscores

check nixos-container names for underscores
This commit is contained in:
Florian Klink 2024-03-20 11:41:34 +02:00 committed by GitHub
commit 39ebd395cc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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}'
'';
}
];
};
};