New Ollama.nix, the ai.nix did not work out. Added ZED-editor as separate app
This commit is contained in:
+316
-310
File diff suppressed because it is too large
Load Diff
+10
-4
@@ -1661,11 +1661,16 @@ let
|
||||
line: builtins.match ("^${key}=\"([^\"]+)\"$") line
|
||||
) lines;
|
||||
# Filter out null matches and get the last one
|
||||
nonNullMatches = lib.filter (match: match != null) matches;
|
||||
nonNullMatches = lib.filter (match: match != null && match != []) matches;
|
||||
# Extract the first capture group from the last match
|
||||
lastMatch = if nonNullMatches != [] then
|
||||
builtins.elemAt nonNullMatches (lib.length nonNullMatches - 1)
|
||||
else
|
||||
null;
|
||||
in
|
||||
if nonNullMatches != [] then
|
||||
# Return the first capture group of the last match
|
||||
builtins.elemAt (builtins.elemAt (lib.elemAt nonNullMatches (lib.length nonNullMatches - 1)) 0) 1
|
||||
if lastMatch != null then
|
||||
# The first capture group is the second element (index 1) of the match
|
||||
builtins.elemAt (builtins.elemAt lastMatch 0) 1
|
||||
else
|
||||
null;
|
||||
|
||||
@@ -1697,6 +1702,7 @@ in
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
#+end_src
|
||||
|
||||
** NCSway
|
||||
|
||||
@@ -18,11 +18,16 @@ let
|
||||
line: builtins.match ("^${key}=\"([^\"]+)\"$") line
|
||||
) lines;
|
||||
# Filter out null matches and get the last one
|
||||
nonNullMatches = lib.filter (match: match != null) matches;
|
||||
nonNullMatches = lib.filter (match: match != null && match != []) matches;
|
||||
# Extract the first capture group from the last match
|
||||
lastMatch = if nonNullMatches != [] then
|
||||
builtins.elemAt nonNullMatches (lib.length nonNullMatches - 1)
|
||||
else
|
||||
null;
|
||||
in
|
||||
if nonNullMatches != [] then
|
||||
# Return the first capture group of the last match
|
||||
builtins.elemAt (builtins.elemAt (lib.elemAt nonNullMatches (lib.length nonNullMatches - 1)) 0) 1
|
||||
if lastMatch != null then
|
||||
# The first capture group is the second element (index 1) of the match
|
||||
builtins.elemAt (builtins.elemAt lastMatch 0) 1
|
||||
else
|
||||
null;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user