mirror of
https://github.com/nix-community/home-manager.git
synced 2025-11-08 19:46:05 +01:00
Apply nixfmt on many files
This commit is contained in:
parent
9799d3de2d
commit
45abf3d38a
177 changed files with 2850 additions and 3565 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue