Validate username format

Co-authored-by: ragusa-it <196988693+ragusa-it@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-02-01 20:55:47 +00:00
parent 87c317921f
commit 4370c6a22d

View File

@@ -1,6 +1,12 @@
{ config, pkgs, inputs, system, hostname, username, ... }:
{
assertions = [
{
assertion = builtins.match "^[a-z_][a-z0-9_-]*$" username != null;
message = "username must be a simple system user name without path separators.";
}
];
# --------------------------------------------------------------------------
# BOOT
# --------------------------------------------------------------------------