summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--npins/sources.json4
-rw-r--r--system/linde.nix4
-rw-r--r--user/marvin.nix7
-rw-r--r--user/settings/git.nix58
-rw-r--r--user/settings/workstation.nix44
5 files changed, 60 insertions, 57 deletions
diff --git a/npins/sources.json b/npins/sources.json
index 7d409ddd..ff2a24ff 100644
--- a/npins/sources.json
+++ b/npins/sources.json
@@ -112,9 +112,9 @@
         "url": "https://git.alanpearce.eu/searchix"
       },
       "branch": "main",
-      "revision": "9102aef53c5fb73585359306a518e726a3623731",
+      "revision": "e8fbdf3bd12c8920a6e9bd84b34e787764b11eaf",
       "url": null,
-      "hash": "0xhan5fvvh6y4nx5cavl7y0lnw2cmd694jqyd6j9yb8nv9pg6rdh"
+      "hash": "02x3xmabdzhl3192c0vicz8fbd14g1wcjcj1q0m6wc89faxh013b"
     },
     "srvos": {
       "type": "Git",
diff --git a/system/linde.nix b/system/linde.nix
index 68165a5e..31aa5766 100644
--- a/system/linde.nix
+++ b/system/linde.nix
@@ -910,6 +910,9 @@ in
 
   services.searchix = {
     enable = true;
+    environment = {
+      GOMEMLIMIT = "2000MiB";
+    };
     settings = {
       web =
         let
@@ -976,6 +979,7 @@ in
           fetcher = "channel-nixpkgs";
           channel = "nixos-unstable";
         };
+        nur.enable = true;
       };
     };
   };
diff --git a/user/marvin.nix b/user/marvin.nix
index 1341b034..d064626b 100644
--- a/user/marvin.nix
+++ b/user/marvin.nix
@@ -32,6 +32,10 @@
   home.sessionPath = [
     "/Library/Developer/CommandLineTools/usr/bin"
   ];
+  home.sessionVariables = {
+    OLLAMA_API_BASE = "http://localhost:11434";
+  };
+
   launchd.agents = {
     ollama = {
       enable = true;
@@ -44,8 +48,9 @@
         StandardErrorPath = "/Users/alan/Library/Logs/ollama.log";
         EnvironmentVariables = {
           OLLAMA_HOST = "[::]:11434";
-          OLLAMA_KEEP_ALIVE = "-1"; # keep models in memory forever
+          OLLAMA_KEEP_ALIVE = "43200"; # keep models in memory for half a day
           OLLAMA_FLASH_ATTENTION = "1"; # significantly reduce memory usage as the context size grows
+          OLLAMA_CONTEXT_LENGTH = "131072";
         };
       };
     };
diff --git a/user/settings/git.nix b/user/settings/git.nix
index ae5947d5..d2721db4 100644
--- a/user/settings/git.nix
+++ b/user/settings/git.nix
@@ -1,26 +1,11 @@
 { config
 , pkgs
 , ...
-}:
-let
-  name = "Alan Pearce";
-  email = "alan@alanpearce.eu";
-in
-{
+}: {
   programs.git = {
     enable = true;
-    userName = name;
-    userEmail = email;
-    delta = {
-      enable = false;
-      options = {
-        navigate = true;
-        light = true;
-      };
-    };
-    difftastic = {
-      enable = true;
-    };
+    userName = "Alan Pearce";
+    userEmail = "alan@alanpearce.eu";
     extraConfig = {
       init = {
         defaultBranch = "main";
@@ -70,10 +55,6 @@ in
       merge = {
         conflictStyle = "zdiff3";
       };
-      "merge.mergiraf" = {
-        name = "mergiraf";
-        driver = "${pkgs.mergiraf}/bin/mergiraf merge --git %O %A %B -s %S -x %X -y %Y -p %P -l %L";
-      };
       diff = {
         algorithm = "histogram";
         colorMoved = "plain";
@@ -143,39 +124,8 @@ in
       ".tabnine_root"
     ];
   };
-  programs.gh = {
-    enable = true;
-    settings = {
-      git_protocol = "ssh";
-      aliases = {
-        fork = "repo fork --remote --remote-name alanpearce --default-branch-only";
-      };
-    };
-  };
-  programs.jujutsu = {
-    enable = true;
-    settings = {
-      user = {
-        inherit name email;
-      };
-      ui = {
-        "diff.tool" = [ "${pkgs.difftastic}/bin/difft" "--color=always" "$left" "$right" ];
-      };
-    };
-  };
-  xdg.configFile."git/attributes" = {
-    source = (pkgs.runCommandLocal "mergiraf-gitattributes" { } ''
-      ${pkgs.mergiraf}/bin/mergiraf languages --gitattributes >> $out
-    '');
-  };
   home.packages = with pkgs; [
-    git-extras # delete-merged-branches and friends
-    git-worktree-switcher
     ghq
-    # reduce these on server
-    mergiraf
-    gitui
-    gitstatus
-    hut # sourcehut tools
+    gst
   ];
 }
diff --git a/user/settings/workstation.nix b/user/settings/workstation.nix
index 8ecf1cfb..44a6e6b4 100644
--- a/user/settings/workstation.nix
+++ b/user/settings/workstation.nix
@@ -14,6 +14,12 @@
   home.packages = with pkgs; [
     walk
     nuspell
+    git-extras # delete-merged-branches and friends
+    git-worktree-switcher
+    mergiraf
+    gitui
+    gitstatus
+    hut # sourcehut tools
   ] ++ (with pkgs.hunspellDicts; [
     en-gb-large
     de-de
@@ -22,4 +28,42 @@
   home.shellAliases = {
     wprop = "xprop | egrep '^WM_(CLASS|NAME|WINDOW_ROLE|TYPE)'";
   };
+
+  programs.git = {
+    difftastic = {
+      enable = true;
+    };
+    extraConfig = {
+      "merge.mergiraf" = {
+        name = "mergiraf";
+        driver = "${pkgs.mergiraf}/bin/mergiraf merge --git %O %A %B -s %S -x %X -y %Y -p %P -l %L";
+      };
+    };
+  };
+  programs.gh = {
+    enable = true;
+    settings = {
+      git_protocol = "ssh";
+      aliases = {
+        fork = "repo fork --remote --remote-name alanpearce --default-branch-only";
+      };
+    };
+  };
+  programs.jujutsu = {
+    enable = true;
+    settings = {
+      user = {
+        name = config.programs.git.userName;
+        email = config.programs.git.userEmail;
+      };
+      ui = {
+        "diff.tool" = [ "${pkgs.difftastic}/bin/difft" "--color=always" "$left" "$right" ];
+      };
+    };
+  };
+  xdg.configFile."git/attributes" = {
+    source = (pkgs.runCommandLocal "mergiraf-gitattributes" { } ''
+      ${pkgs.mergiraf}/bin/mergiraf languages --gitattributes >> $out
+    '');
+  };
 }