aboutsummaryrefslogtreecommitdiff
path: root/home-manager/modules/lib/strings.nix
diff options
context:
space:
mode:
Diffstat (limited to 'home-manager/modules/lib/strings.nix')
-rw-r--r--home-manager/modules/lib/strings.nix13
1 files changed, 4 insertions, 9 deletions
diff --git a/home-manager/modules/lib/strings.nix b/home-manager/modules/lib/strings.nix
index 13d6bb03be6..fe7b2fa3061 100644
--- a/home-manager/modules/lib/strings.nix
+++ b/home-manager/modules/lib/strings.nix
@@ -9,19 +9,14 @@ with lib;
# All characters that are considered safe. Note "-" is not
# included to avoid "-" followed by digit being interpreted as a
# version.
- safeChars =
- [ "+" "." "_" "?" "=" ]
- ++ lowerChars
- ++ upperChars
+ safeChars = [ "+" "." "_" "?" "=" ] ++ lowerChars ++ upperChars
++ stringToCharacters "0123456789";
empties = l: genList (x: "") (length l);
- unsafeInName = stringToCharacters (
- replaceStrings safeChars (empties safeChars) path
- );
+ unsafeInName =
+ stringToCharacters (replaceStrings safeChars (empties safeChars) path);
safeName = replaceStrings unsafeInName (empties unsafeInName) path;
- in
- "hm_" + safeName;
+ in "hm_" + safeName;
}