about summary refs log tree commit diff
path: root/configurations/eonwe
diff options
context:
space:
mode:
authorazahi <azat@bahawi.net>2024-12-17 02:04:27 +0300
committerazahi <azat@bahawi.net>2024-12-17 02:04:27 +0300
commit1ae038a0a86348074b422ea87c03836b0962af67 (patch)
treeae56c73c01b4777e3e24a22c2d67943706997cf0 /configurations/eonwe
parent2024-12-02 (diff)
2024-12-17 HEAD master
Diffstat (limited to '')
-rw-r--r--configurations/eonwe/default.nix13
-rw-r--r--configurations/eonwe/ollama.nix67
2 files changed, 49 insertions, 31 deletions
diff --git a/configurations/eonwe/default.nix b/configurations/eonwe/default.nix
index f1a56e6..f718135 100644
--- a/configurations/eonwe/default.nix
+++ b/configurations/eonwe/default.nix
@@ -12,6 +12,7 @@ with lib;
     ark.enable = true;
 
     wireguard.client.enable = true;
+    wireguard-ng.client.enable = false;
 
     syncthing.enable = true;
 
@@ -52,8 +53,8 @@ with lib;
             mapShaders = map (args: toString (pkgs.fetchurl args));
             cfl-prediction = mapShaders [
               {
-                url = "https://raw.githubusercontent.com/Artoriuz/glsl-chroma-from-luma-prediction/471c65dd3915d39e7ef69957ab63e006125fbb88/CfL_Prediction.glsl";
-                sha256 = "sha256-Mgb1KqF1EPPzR3SCVr9S4XzVmZkYEEFIHSp59RZ9wq8=";
+                url = "https://raw.githubusercontent.com/Artoriuz/glsl-chroma-from-luma-prediction/9fdd0bc68cd8ae42a8072a7d5d098f118daa4293/CfL_Prediction.glsl";
+                sha256 = "sha256-RK3baWkL0mZwcx+utsHfiiX1mY1jxEOg7/kNsNJvEPc=";
               }
             ];
             ravu-lite-ar-r4 = mapShaders [
@@ -64,8 +65,8 @@ with lib;
             ];
             ssimdownscaler = mapShaders [
               {
-                url = "https://gist.githubusercontent.com/igv/36508af3ffc84410fe39761d6969be10/raw/575d13567bbe3caa778310bd3b2a4c516c445039/SSimDownscaler.glsl";
-                sha256 = "sha256-AEq2wv/Nxo9g6Y5e4I9aIin0plTcMqBG43FuOxbnR1w=";
+                url = "https://gist.githubusercontent.com/igv/36508af3ffc84410fe39761d6969be10/raw/38992bce7f9ff844f800820df0908692b65bb74a/SSimDownscaler.glsl";
+                sha256 = "sha256-9G9HEKFi0XBYudgu2GEFiLDATXvgfO9r8qjEB3go+AQ=";
               }
             ];
           in
@@ -151,6 +152,8 @@ with lib;
     };
   };
 
+  programs.corectrl.enable = true;
+
   services = {
     displayManager = {
       sddm.enable = lib.mkForce false;
@@ -325,6 +328,8 @@ with lib;
     memoryPercent = 25;
   };
 
+  my.extraGroups = [ "corectrl" ];
+
   users = {
     users.builder = {
       isSystemUser = true;
diff --git a/configurations/eonwe/ollama.nix b/configurations/eonwe/ollama.nix
index 69fa9fd..806885b 100644
--- a/configurations/eonwe/ollama.nix
+++ b/configurations/eonwe/ollama.nix
@@ -3,7 +3,6 @@
   lib,
   ...
 }:
-
 {
   ark.directories = [
     config.services.ollama.home
@@ -16,7 +15,11 @@
       bookmarks = [
         {
           name = "Ollama";
-          url = "http://127.0.0.1:11435";
+          url = "http://eonwe.shire.net:11435";
+        }
+        {
+          name = "Open WebUI";
+          url = "http://eonwe.shire.net:11436";
         }
       ];
     }
@@ -24,7 +27,7 @@
 
   services = {
     ollama = {
-      enable = false;
+      enable = true;
 
       host = "0.0.0.0";
       port = 11434;
@@ -33,52 +36,62 @@
       group = "ollama";
 
       acceleration = "rocm";
-      rocmOverrideGfx = "10.3.0";
+      rocmOverrideGfx = "11.0.0";
 
       environmentVariables.OLLAMA_ORIGINS = lib.concatStringsSep "," [
-        "http://127.0.0.1:11435"
+        "http://eonwe.shire.net:11434"
         "http://eonwe.shire.net:11435"
-        "http://eonwe:11435"
-        "http://localhost:11435"
+        "http://eonwe.shire.net:11436"
       ];
 
       openFirewall = true;
     };
 
+    nextjs-ollama-llm-ui = {
+      enable = true;
+
+      hostname = "0.0.0.0";
+      port = 11435;
+
+      ollamaUrl = "http://eonwe.shire.net:11434";
+    };
+
     open-webui = {
-      enable = false;
+      enable = true;
+
+      host = "0.0.0.0";
       port = 11436;
+
       environment = {
         ANONYMIZED_TELEMETRY = "False";
         DO_NOT_TRACK = "True";
         ENABLE_SIGNUP = "False";
-        OLLAMA_BASE_URL = "http://127.0.0.1:11434";
+        OLLAMA_BASE_URL = "http://eonwe.shire.net:11434";
         SCARF_NO_ANALYTICS = "True";
         WEBUI_AUTH = "False";
         WEBUI_URL = "http://eonwe.shire.net:11436";
       };
-    };
 
-    nextjs-ollama-llm-ui = {
-      enable = false;
-
-      hostname = "0.0.0.0";
-      port = 11435;
-
-      ollamaUrl = "http://127.0.0.1:11434";
+      openFirewall = true;
     };
   };
 
-  systemd.services = {
-    ollama = {
-      serviceConfig = {
-        StateDirectory = lib.mkForce config.services.ollama.home;
-        DynamicUser = lib.mkForce false;
-        User = config.services.ollama.user;
-        Group = config.services.ollama.group;
-      };
-    };
+  systemd.services.ollama.serviceConfig = {
+    StateDirectory = lib.mkForce config.services.ollama.home;
+    DynamicUser = lib.mkForce false;
+    User = config.services.ollama.user;
+    Group = config.services.ollama.group;
+  };
 
-    nextjs-ollama-llm-ui.serviceConfig.CacheDirectory = "nextjs-ollama-llm-ui";
+  users = {
+    users.ollama = {
+      isSystemUser = true;
+      group = "ollama";
+      inherit (config.services.ollama) home;
+      uid = 241; # Reuses a removed ID from Nixpkgs.
+    };
+    groups.ollama.gid = 241;
   };
+
+  my.extraGroups = [ "ollama" ];
 }

Consider giving Nix/NixOS a try! <3