about summary refs log tree commit diff
path: root/configurations/eonwe
diff options
context:
space:
mode:
Diffstat (limited to 'configurations/eonwe')
-rw-r--r--configurations/eonwe/default.nix19
-rw-r--r--configurations/eonwe/ollama.nix68
-rw-r--r--configurations/eonwe/vidya.nix1
3 files changed, 86 insertions, 2 deletions
diff --git a/configurations/eonwe/default.nix b/configurations/eonwe/default.nix
index 3928e84..9fd4ba2 100644
--- a/configurations/eonwe/default.nix
+++ b/configurations/eonwe/default.nix
@@ -23,7 +23,6 @@ with lib;
     android.enable = true;
     beets.enable = true;
     bluetooth.enable = true;
-    incus.enable = true;
     libvirtd.enable = true;
     mpd.enable = true;
     qutebrowser.enable = true;
@@ -39,6 +38,7 @@ with lib;
       paper-plane
       qolibri
       radeontop
+      rocmPackages.rocm-smi
       vial
       wacomtablet
     ];
@@ -295,6 +295,23 @@ with lib;
     "/home/${my.username}".neededForBoot = true;
   };
 
+  systemd.mounts = [
+    {
+      type = "tmpfs";
+      what = "tmpfs";
+      where = "/var/tmp";
+      mountConfig.Options = [
+        "huge=within_size"
+        "mode=1777"
+        "noatime"
+        "nodev"
+        "nosuid"
+        "rw"
+        "size=25%"
+      ];
+    }
+  ];
+
   zramSwap = {
     enable = true;
     memoryPercent = 25;
diff --git a/configurations/eonwe/ollama.nix b/configurations/eonwe/ollama.nix
new file mode 100644
index 0000000..a98fb3f
--- /dev/null
+++ b/configurations/eonwe/ollama.nix
@@ -0,0 +1,68 @@
+{
+  config,
+  lib,
+  ...
+}:
+
+{
+  ark.directories = [ config.services.ollama.home ];
+
+  hm.programs.firefox.profiles.default.bookmarks = [
+    {
+      name = "Bookmarks Toolbar";
+      toolbar = true;
+      bookmarks = [
+        {
+          name = "Ollama";
+          url = "http://127.0.0.1:11435";
+        }
+      ];
+    }
+  ];
+
+  services = {
+    ollama = {
+      enable = true;
+
+      host = "0.0.0.0";
+      port = 11434;
+
+      user = "ollama";
+      group = "ollama";
+
+      acceleration = "rocm";
+      rocmOverrideGfx = "10.3.0";
+
+      environmentVariables.OLLAMA_ORIGINS = lib.concatStringsSep "," [
+        "http://127.0.0.1:11435"
+        "http://eonwe.shire.net:11435"
+        "http://eonwe:11435"
+        "http://localhost:11435"
+      ];
+
+      openFirewall = true;
+    };
+
+    nextjs-ollama-llm-ui = {
+      enable = true;
+
+      hostname = "0.0.0.0";
+      port = 11435;
+
+      ollamaUrl = "http://127.0.0.1:11434";
+    };
+  };
+
+  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";
+  };
+}
diff --git a/configurations/eonwe/vidya.nix b/configurations/eonwe/vidya.nix
index bf9ffb4..a40daa9 100644
--- a/configurations/eonwe/vidya.nix
+++ b/configurations/eonwe/vidya.nix
@@ -33,7 +33,6 @@
     fallout-ce
     fallout2-ce
     gzdoom
-    nethack
     openmw
     openttd
     qzdl

Consider giving Nix/NixOS a try! <3