mirror of
https://github.com/nix-community/home-manager.git
synced 2025-12-15 21:41:09 +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
|
|
@ -2,13 +2,15 @@
|
|||
|
||||
rec {
|
||||
# Produces a Zsh shell like value
|
||||
toZshValue = v: if builtins.isBool v then
|
||||
if v then "true" else "false"
|
||||
else if builtins.isString v then
|
||||
"\"${v}\""
|
||||
else if builtins.isList v then
|
||||
"(${lib.concatStringsSep " " (map toZshValue v)})"
|
||||
else "\"${toString v}\"";
|
||||
toZshValue = v:
|
||||
if builtins.isBool v then
|
||||
if v then "true" else "false"
|
||||
else if builtins.isString v then
|
||||
''"${v}"''
|
||||
else if builtins.isList v then
|
||||
"(${lib.concatStringsSep " " (map toZshValue v)})"
|
||||
else
|
||||
''"${toString v}"'';
|
||||
|
||||
# Produces a Zsh shell like definition statement
|
||||
define = n: v: "${n}=${toZshValue v}";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue