From 8bb72cb1b6aba5a073759217c87c71d12f996543 Mon Sep 17 00:00:00 2001 From: Jake Hamilton Date: Mon, 28 Oct 2024 11:17:09 -0700 Subject: [PATCH] chore: enable ollama for bismuth testing --- flake.lock | 38 ++++++++++++++++-------- flake.nix | 2 +- modules/nixos/nix/default.nix | 4 +-- systems/x86_64-linux/bismuth/default.nix | 17 +++++++---- 4 files changed, 40 insertions(+), 21 deletions(-) diff --git a/flake.lock b/flake.lock index f44e7bc..2dbb5fa 100644 --- a/flake.lock +++ b/flake.lock @@ -1801,20 +1801,18 @@ }, "neovim": { "inputs": { - "nixpkgs": [ - "unstable" - ], + "nixpkgs": "nixpkgs_2", "nixvim": "nixvim", "pre-commit-hooks": "pre-commit-hooks", "snowfall-lib": "snowfall-lib_10", "unstable": "unstable_2" }, "locked": { - "lastModified": 1727239872, - "narHash": "sha256-4aJjcWmeP+ZIz4ewetTleZ8gbZM/HHau93Z4CO6DdRc=", + "lastModified": 1729034208, + "narHash": "sha256-cmzmMam0QDlEnCsvr8FrMmSbNTgXAE1rfNptEajRmhY=", "owner": "jakehamilton", "repo": "neovim", - "rev": "8ab49453f340988c22ebe4fb4362a05646d5f851", + "rev": "ec946eaf61058af80c39551c958c027242e04367", "type": "github" }, "original": { @@ -1972,6 +1970,22 @@ } }, "nixpkgs_2": { + "locked": { + "lastModified": 1720031269, + "narHash": "sha256-rwz8NJZV+387rnWpTYcXaRNvzUSnnF9aHONoJIYmiUQ=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "9f4128e00b0ae8ec65918efeba59db998750ead6", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { "locked": { "lastModified": 1726969270, "narHash": "sha256-8fnFlXBgM/uSvBlLWjZ0Z0sOdRBesyNdH0+esxqizGc=", @@ -1987,7 +2001,7 @@ "type": "github" } }, - "nixpkgs_3": { + "nixpkgs_4": { "locked": { "lastModified": 1700794826, "narHash": "sha256-RyJTnTNKhO0yqRpDISk03I/4A67/dp96YRxc86YOPgU=", @@ -2234,7 +2248,7 @@ "nix-ld": "nix-ld", "nixos-generators": "nixos-generators", "nixos-hardware": "nixos-hardware", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs_3", "nixpkgs-news": "nixpkgs-news", "noop-ai-website": "noop-ai-website", "pungeonquest": "pungeonquest", @@ -2971,7 +2985,7 @@ }, "thaw": { "inputs": { - "nixpkgs": "nixpkgs_3", + "nixpkgs": "nixpkgs_4", "snowfall-lib": "snowfall-lib_19" }, "locked": { @@ -3101,11 +3115,11 @@ }, "unstable_5": { "locked": { - "lastModified": 1726937504, - "narHash": "sha256-bvGoiQBvponpZh8ClUcmJ6QnsNKw0EMrCQJARK3bI1c=", + "lastModified": 1728492678, + "narHash": "sha256-9UTxR8eukdg+XZeHgxW5hQA9fIKHsKCdOIUycTryeVw=", "owner": "nixos", "repo": "nixpkgs", - "rev": "9357f4f23713673f310988025d9dc261c20e70c6", + "rev": "5633bcff0c6162b9e4b5f1264264611e950c8ec7", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index bf87df0..f140fa8 100644 --- a/flake.nix +++ b/flake.nix @@ -67,7 +67,7 @@ # Neovim neovim.url = "github:jakehamilton/neovim"; - neovim.inputs.nixpkgs.follows = "unstable"; + # neovim.inputs.nixpkgs.follows = "unstable"; # Tmux tmux.url = "github:jakehamilton/tmux"; diff --git a/modules/nixos/nix/default.nix b/modules/nixos/nix/default.nix index bae2370..a70e8f1 100644 --- a/modules/nixos/nix/default.nix +++ b/modules/nixos/nix/default.nix @@ -83,8 +83,8 @@ in ] ++ (mapAttrsToList (name: value: value.key) cfg.extra-substituters); } // (lib.optionalAttrs config.${namespace}.tools.direnv.enable { - keep-outputs = true; - keep-derivations = true; + # keep-outputs = true; + # keep-derivations = true; }); gc = { diff --git a/systems/x86_64-linux/bismuth/default.nix b/systems/x86_64-linux/bismuth/default.nix index 315a471..009bb8f 100644 --- a/systems/x86_64-linux/bismuth/default.nix +++ b/systems/x86_64-linux/bismuth/default.nix @@ -10,13 +10,13 @@ with lib; with lib.${namespace}; { imports = [ - ./hardware.nix - "${inputs.unstable}/nixos/modules/services/misc/ollama.nix" - ]; + ./hardware.nix + "${inputs.unstable}/nixos/modules/services/misc/ollama.nix" + ]; - disabledModules = [ - "${inputs.nixpkgs}/nixos/modules/services/misc/ollama.nix" - ]; + disabledModules = [ + "${inputs.nixpkgs}/nixos/modules/services/misc/ollama.nix" + ]; # Resolve an issue with Bismuth's wired connections failing sometimes due to weird # DHCP issues. I'm not quite sure why this is the case, but I have found that the @@ -47,6 +47,11 @@ with lib.${namespace}; rocmOverrideGfx = "10.1.0"; }; + systemd.services.ollama.environment = { + OLLAMA_NUM_THREADS = "8"; + OLLAMA_MAX_LOADED = "1"; + }; + environment.systemPackages = with pkgs; [ chromium plusultra.kalidoface