New Ollama.nix, the ai.nix did not work out. Added ZED-editor as separate app

This commit is contained in:
2026-02-28 15:11:14 +01:00
parent 818169d819
commit b8a6f74331
3 changed files with 330 additions and 308 deletions
+312 -305
View File
File diff suppressed because it is too large Load Diff
+9 -2
View File
@@ -1645,17 +1645,24 @@ This Home Manager Nix module (ai.nix) installs the Ollama package and configures
let let
ollamaConfPath = flakeRoot + "/assets/conf/apps/ai/ollama/ollama.conf"; ollamaConfPath = flakeRoot + "/assets/conf/apps/ai/ollama/ollama.conf";
ollamaEnv = builtins.splitLines (builtins.readFile ollamaConfPath);
envVars = lib.genAttrs (ollamaEnv) (line: let
parts = builtins.splitString "=" line;
in
if lib.elemAt parts 0 == "" then
lib.mkForce {}
else
lib.mkForce { (lib.elemAt parts 0) = lib.elemAt parts 1; });
in in
{ {
services.ollama = { services.ollama = {
enable = true; enable = true;
package = pkgs.ollama; package = pkgs.ollama;
environmentFile = ollamaConfPath; environmentVariables = envVars;
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
}; };
} }
#+end_src #+end_src
** Powermenu ** Powermenu
+9 -1
View File
@@ -2,13 +2,21 @@
let let
ollamaConfPath = flakeRoot + "/assets/conf/apps/ai/ollama/ollama.conf"; ollamaConfPath = flakeRoot + "/assets/conf/apps/ai/ollama/ollama.conf";
ollamaEnv = builtins.splitLines (builtins.readFile ollamaConfPath);
envVars = lib.genAttrs (ollamaEnv) (line: let
parts = builtins.splitString "=" line;
in
if lib.elemAt parts 0 == "" then
lib.mkForce {}
else
lib.mkForce { (lib.elemAt parts 0) = lib.elemAt parts 1; });
in in
{ {
services.ollama = { services.ollama = {
enable = true; enable = true;
package = pkgs.ollama; package = pkgs.ollama;
environmentFile = ollamaConfPath; environmentVariables = envVars;
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
}; };
} }