From 705e31e76c35cc37e6178d4aae270e37b4470d0d Mon Sep 17 00:00:00 2001 From: Simon Gardling Date: Wed, 16 Oct 2024 22:01:25 -0400 Subject: [PATCH] fix gpt4all --- etcnixos/flake.lock | 64 +++++--------------------- home-manager/flake.lock | 12 ++--- home-manager/gui.nix | 2 +- home-manager/no-gui.nix | 7 ++- home-manager/progs/fish.nix | 2 + home-manager/progs/gpt4all/gpt4all.nix | 14 ++++-- 6 files changed, 34 insertions(+), 67 deletions(-) diff --git a/etcnixos/flake.lock b/etcnixos/flake.lock index dcaba38..584b769 100644 --- a/etcnixos/flake.lock +++ b/etcnixos/flake.lock @@ -41,7 +41,6 @@ }, "chaotic": { "inputs": { - "fenix": "fenix", "flake-schemas": "flake-schemas", "home-manager": "home-manager_2", "jovian": "jovian", @@ -50,11 +49,11 @@ ] }, "locked": { - "lastModified": 1728835058, - "narHash": "sha256-GbcJ90E8+wBkBh9C1HxBTwKsOkGU41CRaPrd1ksFPtA=", + "lastModified": 1729092978, + "narHash": "sha256-2SMJFFgKSvrQfkfzdcYjwFGvgeoCtDdbl/CGZNIU7hs=", "owner": "chaotic-cx", "repo": "nyx", - "rev": "ec6b449d3d096a0e79db5f8c4a321ea9ec836e40", + "rev": "9af42c96e8d666f1df2b087aba1a6349f1c22f4e", "type": "github" }, "original": { @@ -101,28 +100,6 @@ "type": "github" } }, - "fenix": { - "inputs": { - "nixpkgs": [ - "chaotic", - "nixpkgs" - ], - "rust-analyzer-src": "rust-analyzer-src" - }, - "locked": { - "lastModified": 1728455642, - "narHash": "sha256-abYGwrL6ak5sBRqwPh+V3CPJ6Pa89p378t51b7BO1lE=", - "owner": "nix-community", - "repo": "fenix", - "rev": "3b47535a5c782e4f4ad59cd4bdb23636b6926e03", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "fenix", - "type": "github" - } - }, "flake-compat": { "flake": false, "locked": { @@ -225,11 +202,11 @@ ] }, "locked": { - "lastModified": 1728337164, - "narHash": "sha256-VdRTjJFyq4Q9U7Z/UoC2Q5jK8vSo6E86lHc2OanXtvc=", + "lastModified": 1728903686, + "narHash": "sha256-ZHFrGNWDDriZ4m8CA/5kDa250SG1LiiLPApv1p/JF0o=", "owner": "nix-community", "repo": "home-manager", - "rev": "038630363e7de57c36c417fd2f5d7c14773403e4", + "rev": "e1aec543f5caf643ca0d94b6a633101942fd065f", "type": "github" }, "original": { @@ -247,11 +224,11 @@ ] }, "locked": { - "lastModified": 1728410210, - "narHash": "sha256-vn6qupt1U0M6Hf3eXhK3/K4Du0Z7A60qYS1G14QsRY8=", + "lastModified": 1728974938, + "narHash": "sha256-pTPEx6WlM+nJVGrRUGx7Di4ljZMwE9HfvlZ6f3NzNfo=", "owner": "Jovian-Experiments", "repo": "Jovian-NixOS", - "rev": "a25f915ec05196d15e3f7f8555ffb612d4f1045d", + "rev": "23170582b0658e6afd913149a58863af3a57b376", "type": "github" }, "original": { @@ -272,11 +249,11 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1729028850, - "narHash": "sha256-eOhjiU+3TCaSYZESYhU2ZTUQKrBcer9cQ/XpVkergAg=", + "lastModified": 1729064530, + "narHash": "sha256-oSr/w/5dvf/8ll6NvQlL7+rrK8wzjIcEMP1LvI4Ag08=", "owner": "nix-community", "repo": "lanzaboote", - "rev": "bd01eac8c7cfa9b7e25304f0e7f0fed80de63f9d", + "rev": "2fa1368f938b50e35ca87334b5aeba38a3402165", "type": "github" }, "original": { @@ -393,23 +370,6 @@ "nixpkgs": "nixpkgs" } }, - "rust-analyzer-src": { - "flake": false, - "locked": { - "lastModified": 1728386838, - "narHash": "sha256-Lk64EoJkvp3WMGVJK3CR1TYcNghX0/BqHPLW5zdvmLE=", - "owner": "rust-lang", - "repo": "rust-analyzer", - "rev": "efaf8bd5de34e2f47bd57425b83e0c7974902176", - "type": "github" - }, - "original": { - "owner": "rust-lang", - "ref": "nightly", - "repo": "rust-analyzer", - "type": "github" - } - }, "rust-overlay": { "inputs": { "nixpkgs": [ diff --git a/home-manager/flake.lock b/home-manager/flake.lock index 5a07e0e..03720de 100644 --- a/home-manager/flake.lock +++ b/home-manager/flake.lock @@ -98,11 +98,11 @@ "xwayland-satellite-unstable": "xwayland-satellite-unstable" }, "locked": { - "lastModified": 1729023891, - "narHash": "sha256-8NCqlnMnKldeLEWUyXG8UYbu1Wx2wctsA3+fFnMhNO4=", + "lastModified": 1729090125, + "narHash": "sha256-jZQe55BWLEv6OwItbL7mMsm8A3/1rrLk4vTm3k7+jqg=", "owner": "sodiboo", "repo": "niri-flake", - "rev": "7084b0221f3dec7ea1f1c5203d9e389eb9908d07", + "rev": "44d93e05a400cad197fd10f9d50e9475fc519326", "type": "github" }, "original": { @@ -131,11 +131,11 @@ "niri-unstable": { "flake": false, "locked": { - "lastModified": 1728979917, - "narHash": "sha256-NWt6gwVP6072BcV2FvuZD8fikyDcT5WSBrs+6w9hTsk=", + "lastModified": 1729086716, + "narHash": "sha256-xF1AtbQ+ipQyzyXV8mWGlndbeqACM3IIadyCHO0OtpU=", "owner": "YaLTeR", "repo": "niri", - "rev": "a13b9298c66f45e571533731e2a690a23534df01", + "rev": "84655d3b2627687e14431adb49450cd6af1de40f", "type": "github" }, "original": { diff --git a/home-manager/gui.nix b/home-manager/gui.nix index 1475943..b298277 100644 --- a/home-manager/gui.nix +++ b/home-manager/gui.nix @@ -11,7 +11,7 @@ ./progs/alacritty.nix # gpt4all broken https://github.com/NixOS/nixpkgs/pull/346185 - # ./progs/gpt4all/gpt4all.nix + ./progs/gpt4all/gpt4all.nix ]; nixpkgs.config.allowUnfreePredicate = diff --git a/home-manager/no-gui.nix b/home-manager/no-gui.nix index 059a93d..66bdeea 100644 --- a/home-manager/no-gui.nix +++ b/home-manager/no-gui.nix @@ -35,6 +35,7 @@ } )) cargo-expand + rust-script # find typos in code typos @@ -117,20 +118,18 @@ nil # nix lsp yaml-language-server # yaml lsp marksman # markdown lsp + typescript-language-server # typescript lsp # clang-format and clang-tidy clang-tools - + clang lldb fio age - git-crypt - clang - imagemagick ]; diff --git a/home-manager/progs/fish.nix b/home-manager/progs/fish.nix index 9668a8c..0bad518 100644 --- a/home-manager/progs/fish.nix +++ b/home-manager/progs/fish.nix @@ -49,6 +49,8 @@ in nix-cleanup = "doas nix-collect-garbage --delete-older-than 1d && doas nix-store --optimise && doas nix-store --gc"; gcc-native = "${pkgs.gcc}/bin/gcc -Q --help=target -mtune=native -march=native | ${pkgs.gnugrep}/bin/grep -E '(mtune|march)=' | ${pkgs.gnugrep}/bin/grep -v 'Known valid arguments' | ${pkgs.gnused}/bin/sed -E \"s/[[:space:]]+//g\""; + + chess = "${pkgs.chess-tui} -e ${pkgs.stockfish}/bin/stockfish"; }; shellInit = '' diff --git a/home-manager/progs/gpt4all/gpt4all.nix b/home-manager/progs/gpt4all/gpt4all.nix index a4249d2..59c7573 100644 --- a/home-manager/progs/gpt4all/gpt4all.nix +++ b/home-manager/progs/gpt4all/gpt4all.nix @@ -29,13 +29,13 @@ let gpt4all_package = ( optimizeWithFlags (pkgs.gpt4all.overrideAttrs (old: { - version = "3.4.1"; + version = "3.4.2"; src = pkgs.fetchFromGitHub { fetchSubmodules = true; owner = "nomic-ai"; repo = "gpt4all"; - rev = "v3.4.1"; - sha256 = "L29ZQlDDJlh538cgAGuo/ijtBQvZ0vloH4vdJ1oIe5I="; + rev = "v3.4.2"; + sha256 = "QzU22y6tt3UhazVSPcFuKejH4AV+mw7JExH61NtAKoM="; }; cmakeFlags = old.cmakeFlags ++ [ @@ -46,12 +46,18 @@ let patches = old.patches ++ [ ./disable-settings-err.patch ./disable-version-check.patch + (pkgs.fetchpatch { + url = "https://aur.archlinux.org/cgit/aur.git/plain/004-fix-build-with-qt-6.8.0.diff?h=gpt4all-chat&id=d14b12cb63fae95e578aa839a570189a23833051"; + sha256 = "3Zur9KFn45f4dgAzOF7p1q42IdLqXwioN4zMiBbWbVU="; + stripLen = 1; + }) ]; })) # compile flags [ - "-Ofast" + "-O3" + "-ffast-math" "-march=native" "-mtune=native" "-fno-finite-math-only" # https://github.com/ggerganov/llama.cpp/pull/7154#issuecomment-2143844461