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
|
line: builtins.match ("^${key}=\"([^\"]+)\"$") line
|
||||||
) lines;
|
) lines;
|
||||||
# Filter out null matches and get the last one
|
# 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
|
in
|
||||||
if nonNullMatches != [] then
|
if lastMatch != null then
|
||||||
# Return the first capture group of the last match
|
# The first capture group is the second element (index 1) of the match
|
||||||
builtins.elemAt (builtins.elemAt (lib.elemAt nonNullMatches (lib.length nonNullMatches - 1)) 0) 1
|
builtins.elemAt (builtins.elemAt lastMatch 0) 1
|
||||||
else
|
else
|
||||||
null;
|
null;
|
||||||
|
|
||||||
@@ -1697,6 +1702,7 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** NCSway
|
** NCSway
|
||||||
|
|||||||
@@ -18,11 +18,16 @@ let
|
|||||||
line: builtins.match ("^${key}=\"([^\"]+)\"$") line
|
line: builtins.match ("^${key}=\"([^\"]+)\"$") line
|
||||||
) lines;
|
) lines;
|
||||||
# Filter out null matches and get the last one
|
# 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
|
in
|
||||||
if nonNullMatches != [] then
|
if lastMatch != null then
|
||||||
# Return the first capture group of the last match
|
# The first capture group is the second element (index 1) of the match
|
||||||
builtins.elemAt (builtins.elemAt (lib.elemAt nonNullMatches (lib.length nonNullMatches - 1)) 0) 1
|
builtins.elemAt (builtins.elemAt lastMatch 0) 1
|
||||||
else
|
else
|
||||||
null;
|
null;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user