summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--krebs/4lib/types.nix4
1 files changed, 2 insertions, 2 deletions
diff --git a/krebs/4lib/types.nix b/krebs/4lib/types.nix
index b048f48d8..628555a9e 100644
--- a/krebs/4lib/types.nix
+++ b/krebs/4lib/types.nix
@@ -325,7 +325,7 @@ types // rec {
# POSIX.1‐2013, 3.278 Portable Filename Character Set
filename = mkOptionType {
name = "POSIX filename";
- check = x: match "[0-9A-Za-z._-]+" x != null;
+ check = x: match "([0-9A-Za-z._])[0-9A-Za-z._-]*" x != null;
merge = mergeOneOption;
};
@@ -347,6 +347,6 @@ types // rec {
# POSIX.1-2013, 3.431 User Name
username = mkOptionType {
name = "POSIX username";
- check = s: filename.check s && substring 0 1 s != "-";
+ check = filename.check;
};
}