From c3b15d99ecd6ec65ca0d1e55438a3d6c635c292b Mon Sep 17 00:00:00 2001 From: Dmitriy Kholkin Date: Sun, 4 Aug 2024 13:37:38 +0300 Subject: [PATCH] upgrade system --- flake.lock | 394 +++++++++++++++++++-------- flake.nix | 4 + patches/ollama-0.2.8.patch | 511 ++++++++++++++++++++++++++++++++++++ patches/quirc.patch | 30 +++ profiles/servers/ollama.nix | 4 +- 5 files changed, 833 insertions(+), 110 deletions(-) create mode 100644 patches/ollama-0.2.8.patch create mode 100644 patches/quirc.patch diff --git a/flake.lock b/flake.lock index f2abeec..79a5117 100644 --- a/flake.lock +++ b/flake.lock @@ -8,11 +8,11 @@ ] }, "locked": { - "lastModified": 1720211568, - "narHash": "sha256-Uph6rcbiuOD6bGEySonDFozdO+mznTug08x27WG4BIg=", + "lastModified": 1721560199, + "narHash": "sha256-XQVh+i9/m2J2AfwuqJcKpm3GM67Top8mHKgaJ7lL1l0=", "owner": "ezKEa", "repo": "aagl-gtk-on-nix", - "rev": "ce7e02b20fe45425bbdbebc6fe0fdcc018c9efc6", + "rev": "cdb74c540af1d365ea799ba5d2200df707e31090", "type": "github" }, "original": { @@ -26,11 +26,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1720340348, - "narHash": "sha256-TaXRmx6xIfCsXAHNuqR/ue0S7AZhk8sRABFkl1ZpBjU=", + "lastModified": 1721550014, + "narHash": "sha256-3y3dbiO4EiC7nBNKcAitJKh7MsKg2KiPKfb7NLi9RWg=", "owner": "AtaraxiaSjel", "repo": "nur", - "rev": "64a64ef6ca9f4c2681737c3c4896ac7c1ec85452", + "rev": "f3e6bd31145b8de7b6e3600b0da8f0006bc11ce4", "type": "github" }, "original": { @@ -166,11 +166,11 @@ "nixpkgs": "nixpkgs_4" }, "locked": { - "lastModified": 1720295990, - "narHash": "sha256-n3Bv8EXdJ2su6UE5+oX15JDwAeQ222CigWlVJ5NYms4=", + "lastModified": 1721283742, + "narHash": "sha256-g+dnR0c/rTwxb0mTscu5/y1MVDL5rbBxNAJeN47ATzw=", "owner": "catppuccin", "repo": "vscode", - "rev": "08de0d9d44de6693d1379e40a48be797a4fb4715", + "rev": "7ab535427f0d5d128d0bec702abd03758f86d8c2", "type": "github" }, "original": { @@ -179,6 +179,45 @@ "type": "github" } }, + "chaotic": { + "inputs": { + "compare-to": "compare-to", + "flake-schemas": "flake-schemas", + "home-manager": "home-manager", + "jovian": "jovian", + "nixpkgs": "nixpkgs_5", + "systems": "systems", + "yafas": "yafas" + }, + "locked": { + "lastModified": 1721734606, + "narHash": "sha256-7ALQkNFMzDhpuu0eMgHcwRdMjkrTclERKMCIz6XIM5A=", + "owner": "chaotic-cx", + "repo": "nyx", + "rev": "519b516f78421e3b8cdefa89d826c101c7126a0d", + "type": "github" + }, + "original": { + "owner": "chaotic-cx", + "ref": "nyxpkgs-unstable", + "repo": "nyx", + "type": "github" + } + }, + "compare-to": { + "locked": { + "lastModified": 1695341185, + "narHash": "sha256-htO6DSbWyCgaDkxi7foPjXwJFPzGjVt3RRUbPSpNtZY=", + "rev": "98b8e330823a3570d328720f87a1153f8a7f2224", + "revCount": 2, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/chaotic-cx/nix-empty-flake/0.1.2%2Brev-98b8e330823a3570d328720f87a1153f8a7f2224/018aba35-d228-7fa9-b205-7616c89ef4e0/source.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://flakehub.com/f/chaotic-cx/nix-empty-flake/%3D0.1.2.tar.gz" + } + }, "crane": { "inputs": { "nixpkgs": [ @@ -203,7 +242,7 @@ "deploy-rs": { "inputs": { "flake-compat": "flake-compat_3", - "nixpkgs": "nixpkgs_5", + "nixpkgs": "nixpkgs_6", "utils": "utils" }, "locked": { @@ -225,15 +264,15 @@ "cachix": "cachix", "flake-compat": "flake-compat_5", "nix": "nix_2", - "nixpkgs": "nixpkgs_7", + "nixpkgs": "nixpkgs_8", "pre-commit-hooks": "pre-commit-hooks" }, "locked": { - "lastModified": 1720853497, - "narHash": "sha256-xneFQ+RrIcyCb+MnKQPJx55qEEDr0xh5X6Ne3VcnV20=", + "lastModified": 1721650703, + "narHash": "sha256-GNPOqEGUd+AMiR84AD7yiPFQd/c/6K1URkBx9SL8dbk=", "owner": "cachix", "repo": "devenv", - "rev": "7f569a0f2473b9f6000fd9e4c32511fd1b0d37c1", + "rev": "6450828d038d743e97e2e7ff567ce5fa9f17a224", "type": "github" }, "original": { @@ -250,7 +289,7 @@ "flake-compat" ], "nix": "nix", - "nixpkgs": "nixpkgs_6", + "nixpkgs": "nixpkgs_7", "poetry2nix": "poetry2nix", "pre-commit-hooks": [ "devenv", @@ -280,11 +319,11 @@ ] }, "locked": { - "lastModified": 1720661479, - "narHash": "sha256-nsGgA14vVn0GGiqEfomtVgviRJCuSR3UEopfP8ixW1I=", + "lastModified": 1721735625, + "narHash": "sha256-4T0FK0b3Q7Dd7oj79M7GhA9+YqKxxGT0iN+h8yqdP7s=", "owner": "nix-community", "repo": "disko", - "rev": "786965e1b1ed3fd2018d78399984f461e2a44689", + "rev": "4698b1ef375e9c904037e0b2049aa73d39ac1b2d", "type": "github" }, "original": { @@ -462,11 +501,11 @@ ] }, "locked": { - "lastModified": 1719745305, - "narHash": "sha256-xwgjVUpqSviudEkpQnioeez1Uo2wzrsMaJKJClh+Bls=", + "lastModified": 1719994518, + "narHash": "sha256-pQMhCCHyQGRzdfAkdJ4cIWiw+JNuWsTX7f0ZYSyz0VY=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "c3c5ecc05edc7dafba779c6c1a61cd08ac6583e9", + "rev": "9227223f6d922fee3c7b190b2cc238a99527bbb7", "type": "github" }, "original": { @@ -530,6 +569,20 @@ "type": "github" } }, + "flake-schemas": { + "locked": { + "lastModified": 1693491534, + "narHash": "sha256-ifw8Td8kD08J8DxFbYjeIx5naHcDLz7s2IFP3X42I/U=", + "rev": "c702cbb663d6d70bbb716584a2ee3aeb35017279", + "revCount": 21, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/flake-schemas/0.1.1/018a4c59-80e1-708a-bb4d-854930c20f72/source.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://flakehub.com/f/DeterminateSystems/flake-schemas/%3D0.1.1.tar.gz" + } + }, "flake-utils": { "locked": { "lastModified": 1667395993, @@ -580,7 +633,7 @@ }, "flake-utils_3": { "inputs": { - "systems": "systems_2" + "systems": "systems_3" }, "locked": { "lastModified": 1689068808, @@ -598,7 +651,7 @@ }, "flake-utils_4": { "inputs": { - "systems": "systems_3" + "systems": "systems_4" }, "locked": { "lastModified": 1710146030, @@ -631,7 +684,7 @@ }, "flake-utils_6": { "inputs": { - "systems": "systems_4" + "systems": "systems_5" }, "locked": { "lastModified": 1710146030, @@ -649,7 +702,7 @@ }, "flake-utils_7": { "inputs": { - "systems": "systems_5" + "systems": "systems_6" }, "locked": { "lastModified": 1710146030, @@ -712,15 +765,36 @@ "home-manager": { "inputs": { "nixpkgs": [ + "chaotic", "nixpkgs" ] }, "locked": { - "lastModified": 1720734513, - "narHash": "sha256-neWQ8eNtLTd+YMesb7WjKl1SVCbDyCm46LUgP/g/hdo=", + "lastModified": 1721534365, + "narHash": "sha256-XpZOkaSJKdOsz1wU6JfO59Rx2fqtcarQ0y6ndIOKNpI=", "owner": "nix-community", "repo": "home-manager", - "rev": "90ae324e2c56af10f20549ab72014804a3064c7f", + "rev": "635563f245309ef5320f80c7ebcb89b2398d2949", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, + "home-manager_2": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1721714663, + "narHash": "sha256-ZDW5+rlROxaOuoEfIQM7Gqhoa+WALEYdYIiZhyJjAu0=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "7560dc942a6fbd37ebd1310b3dbda513de2d4b82", "type": "github" }, "original": { @@ -744,6 +818,28 @@ "type": "github" } }, + "jovian": { + "inputs": { + "nix-github-actions": "nix-github-actions", + "nixpkgs": [ + "chaotic", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1721226562, + "narHash": "sha256-KfdwusX12hhkzXKBmu2HhaU9EhaxVeWLDQw1Ll2A03o=", + "owner": "Jovian-Experiments", + "repo": "Jovian-NixOS", + "rev": "927eea31915468e06b94bedf678261dc7cf048c8", + "type": "github" + }, + "original": { + "owner": "Jovian-Experiments", + "repo": "Jovian-NixOS", + "type": "github" + } + }, "libnbtplusplus": { "flake": false, "locked": { @@ -781,7 +877,7 @@ "flake-compat": "flake-compat_6", "flake-utils": "flake-utils_5", "nix": "nix_3", - "nixpkgs": "nixpkgs_9" + "nixpkgs": "nixpkgs_10" }, "locked": { "lastModified": 1669478601, @@ -834,11 +930,11 @@ ] }, "locked": { - "lastModified": 1718448591, - "narHash": "sha256-TDzUlwvCmkY4IzEMLV7vmB/GlKznsS+/oBO4Z6z9ACE=", + "lastModified": 1721032743, + "narHash": "sha256-p8i4j8hulVsDCdiUZzIJJrAh+WJSovMvrq0EiC/hHTo=", "owner": "thiagokokada", "repo": "nix-alien", - "rev": "d457975f39a4eaf8bec55b7cc3ff26226d4fb062", + "rev": "ed2c6913a97efad914055ecda76bbe868c4aa5ab", "type": "github" }, "original": { @@ -850,15 +946,15 @@ "nix-direnv": { "inputs": { "flake-parts": "flake-parts_2", - "nixpkgs": "nixpkgs_11", + "nixpkgs": "nixpkgs_12", "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1720437044, - "narHash": "sha256-udTqlDLoHvKwdDSaavE34JLkPmR9P+CRqWag/ICbvLg=", + "lastModified": 1720977067, + "narHash": "sha256-Sp3hvtEGFZvJvMEyBuj9x3dDi0L0jpCV1gGVck+CjOQ=", "owner": "nix-community", "repo": "nix-direnv", - "rev": "4fabc9b64413a59de8bda6850d0c7f7df6a1d040", + "rev": "104a5075a182b5fb15a4e33e21e6c5b869a5151f", "type": "github" }, "original": { @@ -905,6 +1001,29 @@ } }, "nix-github-actions": { + "inputs": { + "nixpkgs": [ + "chaotic", + "jovian", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1690328911, + "narHash": "sha256-fxtExYk+aGf2YbjeWQ8JY9/n9dwuEt+ma1eUFzF8Jeo=", + "owner": "zhaofengli", + "repo": "nix-github-actions", + "rev": "96df4a39c52f53cb7098b923224d8ce941b64747", + "type": "github" + }, + "original": { + "owner": "zhaofengli", + "ref": "matrix-name", + "repo": "nix-github-actions", + "type": "github" + } + }, + "nix-github-actions_2": { "inputs": { "nixpkgs": [ "devenv", @@ -930,14 +1049,14 @@ }, "nix-index-database": { "inputs": { - "nixpkgs": "nixpkgs_10" + "nixpkgs": "nixpkgs_11" }, "locked": { - "lastModified": 1718011381, - "narHash": "sha256-sFXI+ZANp/OC+MwfJoZgPSf4xMdtzQMe1pS3FGti4C8=", + "lastModified": 1720926593, + "narHash": "sha256-fW6e27L6qY6s+TxInwrS2EXZZfhMAlaNqT0sWS49qMA=", "owner": "nix-community", "repo": "nix-index-database", - "rev": "88ad3d7501e22b2401dd72734b032b7baa794434", + "rev": "5fe5b0cdf1268112dc96319388819b46dc051ef4", "type": "github" }, "original": { @@ -955,11 +1074,11 @@ ] }, "locked": { - "lastModified": 1720834061, - "narHash": "sha256-xKk5ZrmxKwy+tCQpGLKW5FCdBr0eR2uK5p6RRWn3+Z0=", + "lastModified": 1721698116, + "narHash": "sha256-JdgX4TIroHxE4lBzZSyxxSvWGi8zveV34KfHuS9by2w=", "owner": "nix-community", "repo": "nix-vscode-extensions", - "rev": "9492c970422e20e7476f3e05dea4976921f79b26", + "rev": "7beca30ffc495e5e3980495e1179939abf0ab8a6", "type": "github" }, "original": { @@ -998,7 +1117,7 @@ "nix_3": { "inputs": { "lowdown-src": "lowdown-src", - "nixpkgs": "nixpkgs_8", + "nixpkgs": "nixpkgs_9", "nixpkgs-regression": "nixpkgs-regression_3" }, "locked": { @@ -1093,11 +1212,11 @@ }, "nixpkgs-master": { "locked": { - "lastModified": 1720864136, - "narHash": "sha256-kT2m8+wmDk+8Fpvk7K891pIk7CyTi7RprQltx/n9kE0=", + "lastModified": 1721737662, + "narHash": "sha256-Hry9QNr5oJ8cT9P8jUzA1hq+0PyXfW39Ama6HhJnfrY=", "owner": "nixos", "repo": "nixpkgs", - "rev": "239de4a6e556671f8ca32f77a3d6e81801321dd1", + "rev": "f9e9e91587171c2e110cd454b556265a0dc24022", "type": "github" }, "original": { @@ -1189,11 +1308,11 @@ }, "nixpkgs-stable_3": { "locked": { - "lastModified": 1720691131, - "narHash": "sha256-CWT+KN8aTPyMIx8P303gsVxUnkinIz0a/Cmasz1jyIM=", + "lastModified": 1721548954, + "narHash": "sha256-7cCC8+Tdq1+3OPyc3+gVo9dzUNkNIQfwSDJ2HSi2u3o=", "owner": "nixos", "repo": "nixpkgs", - "rev": "a046c1202e11b62cbede5385ba64908feb7bfac4", + "rev": "63d37ccd2d178d54e7fb691d7ec76000740ea24a", "type": "github" }, "original": { @@ -1205,11 +1324,11 @@ }, "nixpkgs-stable_4": { "locked": { - "lastModified": 1720282526, - "narHash": "sha256-dudRkHPRivMNOhd04YI+v4sWvn2SnN5ODSPIu5IVbco=", + "lastModified": 1721524707, + "narHash": "sha256-5NctRsoE54N86nWd0psae70YSLfrOek3Kv1e8KoXe/0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "550ac3e955c30fe96dd8b2223e37e0f5d225c927", + "rev": "556533a23879fc7e5f98dd2e0b31a6911a213171", "type": "github" }, "original": { @@ -1221,11 +1340,27 @@ }, "nixpkgs_10": { "locked": { - "lastModified": 1717786204, - "narHash": "sha256-4q0s6m0GUcN7q+Y2DqD27iLvbcd1G50T2lv08kKxkSI=", + "lastModified": 1669378442, + "narHash": "sha256-nm+4PN0A4SnV0SzEchxrMyKPvI3Ld/aoom4PnHeHucs=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "051f920625ab5aabe37c920346e3e69d7d34400e", + "rev": "0faaf0a9bb6dedb69bfd43ac06fb27fadc476c51", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-22.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_11": { + "locked": { + "lastModified": 1720768451, + "narHash": "sha256-EYekUHJE2gxeo2pM/zM9Wlqw1Uw2XTJXOSAO79ksc4Y=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "7e7c39ea35c5cdd002cd4588b03a3fb9ece6fad9", "type": "github" }, "original": { @@ -1235,13 +1370,13 @@ "type": "github" } }, - "nixpkgs_11": { + "nixpkgs_12": { "locked": { - "lastModified": 1719468428, - "narHash": "sha256-vN5xJAZ4UGREEglh3lfbbkIj+MPEYMuqewMn4atZFaQ=", + "lastModified": 1720368505, + "narHash": "sha256-5r0pInVo5d6Enti0YwUSQK4TebITypB42bWy5su3MrQ=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "1e3deb3d8a86a870d925760db1a5adecc64d329d", + "rev": "ab82a9612aa45284d4adf69ee81871a389669a9e", "type": "github" }, "original": { @@ -1251,13 +1386,13 @@ "type": "github" } }, - "nixpkgs_12": { + "nixpkgs_13": { "locked": { - "lastModified": 1720768451, - "narHash": "sha256-EYekUHJE2gxeo2pM/zM9Wlqw1Uw2XTJXOSAO79ksc4Y=", + "lastModified": 1721562059, + "narHash": "sha256-Tybxt65eyOARf285hMHIJ2uul8SULjFZbT9ZaEeUnP8=", "owner": "nixos", "repo": "nixpkgs", - "rev": "7e7c39ea35c5cdd002cd4588b03a3fb9ece6fad9", + "rev": "68c9ed8bbed9dfce253cc91560bf9043297ef2fe", "type": "github" }, "original": { @@ -1267,13 +1402,13 @@ "type": "github" } }, - "nixpkgs_13": { + "nixpkgs_14": { "locked": { - "lastModified": 1720031269, - "narHash": "sha256-rwz8NJZV+387rnWpTYcXaRNvzUSnnF9aHONoJIYmiUQ=", + "lastModified": 1720768451, + "narHash": "sha256-EYekUHJE2gxeo2pM/zM9Wlqw1Uw2XTJXOSAO79ksc4Y=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "9f4128e00b0ae8ec65918efeba59db998750ead6", + "rev": "7e7c39ea35c5cdd002cd4588b03a3fb9ece6fad9", "type": "github" }, "original": { @@ -1332,6 +1467,22 @@ } }, "nixpkgs_5": { + "locked": { + "lastModified": 1721562059, + "narHash": "sha256-Tybxt65eyOARf285hMHIJ2uul8SULjFZbT9ZaEeUnP8=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "68c9ed8bbed9dfce253cc91560bf9043297ef2fe", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_6": { "locked": { "lastModified": 1702272962, "narHash": "sha256-D+zHwkwPc6oYQ4G3A1HuadopqRwUY/JkMwHz1YF7j4Q=", @@ -1347,7 +1498,7 @@ "type": "github" } }, - "nixpkgs_6": { + "nixpkgs_7": { "locked": { "lastModified": 1692808169, "narHash": "sha256-x9Opq06rIiwdwGeK2Ykj69dNc2IvUH1fY55Wm7atwrE=", @@ -1363,7 +1514,7 @@ "type": "github" } }, - "nixpkgs_7": { + "nixpkgs_8": { "locked": { "lastModified": 1713361204, "narHash": "sha256-TA6EDunWTkc5FvDCqU3W2T3SFn0gRZqh6D/hJnM02MM=", @@ -1379,7 +1530,7 @@ "type": "github" } }, - "nixpkgs_8": { + "nixpkgs_9": { "locked": { "lastModified": 1657693803, "narHash": "sha256-G++2CJ9u0E7NNTAi9n5G8TdDmGJXcIjkJ3NF8cetQB8=", @@ -1395,26 +1546,10 @@ "type": "github" } }, - "nixpkgs_9": { - "locked": { - "lastModified": 1669378442, - "narHash": "sha256-nm+4PN0A4SnV0SzEchxrMyKPvI3Ld/aoom4PnHeHucs=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "0faaf0a9bb6dedb69bfd43ac06fb27fadc476c51", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-22.05", - "repo": "nixpkgs", - "type": "github" - } - }, "poetry2nix": { "inputs": { "flake-utils": "flake-utils_3", - "nix-github-actions": "nix-github-actions", + "nix-github-actions": "nix-github-actions_2", "nixpkgs": [ "devenv", "cachix", @@ -1481,11 +1616,11 @@ ] }, "locked": { - "lastModified": 1719259945, - "narHash": "sha256-F1h+XIsGKT9TkGO3omxDLEb/9jOOsI6NnzsXFsZhry4=", + "lastModified": 1720524665, + "narHash": "sha256-ni/87oHPZm6Gv0ECYxr1f6uxB0UKBWJ6HvS7lwLU6oY=", "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "0ff4381bbb8f7a52ca4a851660fc7a437a4c6e07", + "rev": "8d6a17d0cdf411c55f12602624df6368ad86fac1", "type": "github" }, "original": { @@ -1499,15 +1634,15 @@ "flake-compat": "flake-compat_9", "flake-parts": "flake-parts_4", "libnbtplusplus": "libnbtplusplus", - "nixpkgs": "nixpkgs_13", + "nixpkgs": "nixpkgs_14", "pre-commit-hooks": "pre-commit-hooks_2" }, "locked": { - "lastModified": 1720840326, - "narHash": "sha256-r6ex6T8ktE2ZvYWFcM2W8UIxraVzIGRxlzToEBa584I=", + "lastModified": 1721445179, + "narHash": "sha256-+2MLhbTgImchDmHZRjHEqXJa4PYjJLBtx9MsHsTSVkg=", "owner": "AtaraxiaSjel", "repo": "PrismLauncher", - "rev": "c308dfb326ff40e1dce05cd4e0d61b7eae1f3c15", + "rev": "47e1efc0f89b4670a61b9ab9589a74cdb44240ee", "type": "github" }, "original": { @@ -1527,12 +1662,13 @@ "cassowary": "cassowary", "catppuccin": "catppuccin", "catppuccin-vsc": "catppuccin-vsc", + "chaotic": "chaotic", "deploy-rs": "deploy-rs", "devenv": "devenv", "disko": "disko", "flake-parts": "flake-parts", "flake-registry": "flake-registry", - "home-manager": "home-manager", + "home-manager": "home-manager_2", "impermanence": "impermanence", "mms": "mms", "nix-alien": "nix-alien", @@ -1540,7 +1676,7 @@ "nix-fast-build": "nix-fast-build", "nix-vscode-marketplace": "nix-vscode-marketplace", "nixos-generators": "nixos-generators", - "nixpkgs": "nixpkgs_12", + "nixpkgs": "nixpkgs_13", "nixpkgs-master": "nixpkgs-master", "nixpkgs-stable": "nixpkgs-stable_3", "prismlauncher": "prismlauncher", @@ -1555,11 +1691,11 @@ "nixpkgs-stable": "nixpkgs-stable_4" }, "locked": { - "lastModified": 1720479166, - "narHash": "sha256-jqvhLDXzTLTHq9ZviFOpcTmXXmnbLfz7mWhgMNipMN4=", + "lastModified": 1721688883, + "narHash": "sha256-9jsjsRKtJRqNSTXKj9zuDFRf2PGix30nMx9VKyPgD2U=", "owner": "Mic92", "repo": "sops-nix", - "rev": "67035a355b1d52d2d238501f8cc1a18706979760", + "rev": "aff2f88277dabe695de4773682842c34a0b7fd54", "type": "github" }, "original": { @@ -1570,16 +1706,16 @@ }, "systems": { "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "lastModified": 1689347949, + "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "repo": "default-linux", + "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", "type": "github" }, "original": { "owner": "nix-systems", - "repo": "default", + "repo": "default-linux", "type": "github" } }, @@ -1643,6 +1779,21 @@ "type": "github" } }, + "systems_6": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "treefmt-nix": { "inputs": { "nixpkgs": [ @@ -1651,11 +1802,11 @@ ] }, "locked": { - "lastModified": 1719749022, - "narHash": "sha256-ddPKHcqaKCIFSFc/cvxS14goUhCOAwsM1PbMr0ZtHMg=", + "lastModified": 1720374026, + "narHash": "sha256-ludjqxhR/5lXwJ1H6zHmZqp+4e8dFPHE9FIZ2eBh2G4=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "8df5ff62195d4e67e2264df0b7f5e8c9995fd0bd", + "rev": "e1d7bd5ec6fc389eb3a90e232c4150338bf6a508", "type": "github" }, "original": { @@ -1687,7 +1838,7 @@ }, "utils": { "inputs": { - "systems": "systems" + "systems": "systems_2" }, "locked": { "lastModified": 1701680307, @@ -1702,6 +1853,31 @@ "repo": "flake-utils", "type": "github" } + }, + "yafas": { + "inputs": { + "flake-schemas": [ + "chaotic", + "flake-schemas" + ], + "systems": [ + "chaotic", + "systems" + ] + }, + "locked": { + "lastModified": 1695926485, + "narHash": "sha256-wNFFnItckgSs8XeYhhv8vlJs2WF09fSQaWgw4xkDqHQ=", + "owner": "UbiqueLambda", + "repo": "yafas", + "rev": "7772afd6686458ca0ddbc599a52cf5d337367653", + "type": "github" + }, + "original": { + "owner": "UbiqueLambda", + "repo": "yafas", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 132b16f..ec2d4ed 100644 --- a/flake.nix +++ b/flake.nix @@ -62,6 +62,8 @@ url = "github:Mic92/sops-nix"; inputs.nixpkgs.follows = "nixpkgs"; }; + + chaotic.url = "github:chaotic-cx/nyx/nyxpkgs-unstable"; }; outputs = inputs: inputs.flake-parts.lib.mkFlake { inherit inputs; } ( @@ -156,8 +158,10 @@ shared-patches = patchesPath [ ]; unstable-patches = shared-patches ++ patchesPath [ "netbird-24.11.patch" + "ollama-0.2.8.patch" "onlyoffice.patch" "vaultwarden.patch" + "quirc.patch" # "zen-kernels.patch" "fix-args-override.patch" ]; diff --git a/patches/ollama-0.2.8.patch b/patches/ollama-0.2.8.patch new file mode 100644 index 0000000..44aa65c --- /dev/null +++ b/patches/ollama-0.2.8.patch @@ -0,0 +1,511 @@ +From 26a309c6d6d7b62af1fa7a3ba88f5af0e854b2da Mon Sep 17 00:00:00 2001 +From: Pol Dellaiera +Date: Tue, 23 Jul 2024 10:15:42 +0200 +Subject: [PATCH 1/4] ollama: 0.2.7 -> 0.2.8 + +changelog: https://github.com/ollama/ollama/releases/tag/v0.2.8 +diff: https://github.com/ollama/ollama/compare/v0.2.7..v0.2.8 +--- + pkgs/by-name/ol/ollama/package.nix | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +diff --git a/pkgs/by-name/ol/ollama/package.nix b/pkgs/by-name/ol/ollama/package.nix +index 6dd421ec6176cf3..05b33ae57241ad7 100644 +--- a/pkgs/by-name/ol/ollama/package.nix ++++ b/pkgs/by-name/ol/ollama/package.nix +@@ -32,13 +32,13 @@ + let + pname = "ollama"; + # don't forget to invalidate all hashes each update +- version = "0.2.7"; ++ version = "0.2.8"; + + src = fetchFromGitHub { + owner = "ollama"; + repo = "ollama"; + rev = "v${version}"; +- hash = "sha256-YHBGS615dxz6pZR+8awMinp+ZRf3J8Re5BVeDEIyt2E="; ++ hash = "sha256-uir/GoFs0nhhHpznyYkwVjAUWxwjWmGZ7liU2htyQ04="; + fetchSubmodules = true; + }; + +@@ -52,11 +52,11 @@ let + (preparePatch "02-clip-log.diff" "sha256-rMWbl3QgrPlhisTeHwD7EnGRJyOhLB4UeS7rqa0tdXM=") + (preparePatch "03-load_exception.diff" "sha256-NJkT/k8Mf8HcEMb0XkaLmyUNKV3T+384JRPnmwDI/sk=") + (preparePatch "04-metal.diff" "sha256-bPBCfoT3EjZPjWKfCzh0pnCUbM/fGTj37yOaQr+QxQ4=") +- (preparePatch "05-default-pretokenizer.diff" "sha256-50+mzQBQZmYEhYvARHw/dliH0M/gDOYm2uy/yJupDF4=") +- (preparePatch "06-qwen2.diff" "sha256-FdDqEIblPy47z3yavKUnaV93Yk+3oboEzj4vHq+R66M=") +- (preparePatch "07-embeddings.diff" "sha256-lqg2SI0OapD9LCoAG6MJW6HIHXEmCTv7P75rE9yq/Mo=") +- (preparePatch "08-clip-unicode.diff" "sha256-1qMJoXhDewxsqPbmi+/7xILQfGaybZDyXc5eH0winL8=") +- (preparePatch "09-pooling.diff" "sha256-7meKWbr06lbVrtxau0AU9BwJ88Z9svwtDXhmHI+hYBk=") ++ (preparePatch "05-default-pretokenizer.diff" "sha256-Mgx+xi59rz3d5yEXp90QPQMiUr9InlA0Wo1mOSuRcec=") ++ (preparePatch "06-embeddings.diff" "sha256-lqg2SI0OapD9LCoAG6MJW6HIHXEmCTv7P75rE9yq/Mo=") ++ (preparePatch "07-clip-unicode.diff" "sha256-1qMJoXhDewxsqPbmi+/7xILQfGaybZDyXc5eH0winL8=") ++ (preparePatch "08-pooling.diff" "sha256-7meKWbr06lbVrtxau0AU9BwJ88Z9svwtDXhmHI+hYBk=") ++ (preparePatch "09-lora.diff" "sha256-HVDYiqNkuWO9K7aIiT73iiMj5lxMsJC1oqIG4madAPk=") + ]; + + preparePatch = patch: hash: fetchpatch { + +From ef6a3aec105ecdf21fb3d0d92f1e22f80419d82a Mon Sep 17 00:00:00 2001 +From: Pol Dellaiera +Date: Tue, 23 Jul 2024 10:29:48 +0200 +Subject: [PATCH 2/4] ollama: reformat with `nixfmt-rfc-style` + +--- + .git-blame-ignore-revs | 3 + + pkgs/by-name/ol/ollama/package.nix | 320 +++++++++++++++-------------- + 2 files changed, 169 insertions(+), 154 deletions(-) + +diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs +index 012889bb2e8247f..ae22633837b6fe5 100644 +--- a/.git-blame-ignore-revs ++++ b/.git-blame-ignore-revs +@@ -141,3 +141,6 @@ acd0e3898feb321cb9a71a0fd376f1157d0f4553 + + # poptracker: format with nixfmt-rfc-style (#326697) + ff5c8f6cc3d1f2e017e86d50965c14b71f00567b ++ ++# ollama: reformat with nixfmt-rfc-style (#329353) ++8f91c4628a6b2e3f486c150c15b7407214d9b9de +diff --git a/pkgs/by-name/ol/ollama/package.nix b/pkgs/by-name/ol/ollama/package.nix +index 05b33ae57241ad7..7b1f2c88e92e591 100644 +--- a/pkgs/by-name/ol/ollama/package.nix ++++ b/pkgs/by-name/ol/ollama/package.nix +@@ -1,32 +1,33 @@ +-{ lib +-, buildGoModule +-, fetchFromGitHub +-, fetchpatch +-, buildEnv +-, linkFarm +-, overrideCC +-, makeWrapper +-, stdenv +-, addDriverRunpath +- +-, cmake +-, gcc12 +-, clblast +-, libdrm +-, rocmPackages +-, cudaPackages +-, darwin +-, autoAddDriverRunpath +- +-, nixosTests +-, testers +-, ollama +-, ollama-rocm +-, ollama-cuda +- +-, config ++{ ++ lib, ++ buildGoModule, ++ fetchFromGitHub, ++ fetchpatch, ++ buildEnv, ++ linkFarm, ++ overrideCC, ++ makeWrapper, ++ stdenv, ++ addDriverRunpath, ++ ++ cmake, ++ gcc12, ++ clblast, ++ libdrm, ++ rocmPackages, ++ cudaPackages, ++ darwin, ++ autoAddDriverRunpath, ++ ++ nixosTests, ++ testers, ++ ollama, ++ ollama-rocm, ++ ollama-cuda, ++ ++ config, + # one of `[ null false "rocm" "cuda" ]` +-, acceleration ? null ++ acceleration ? null, + }: + + let +@@ -59,25 +60,28 @@ let + (preparePatch "09-lora.diff" "sha256-HVDYiqNkuWO9K7aIiT73iiMj5lxMsJC1oqIG4madAPk=") + ]; + +- preparePatch = patch: hash: fetchpatch { +- url = "file://${src}/llm/patches/${patch}"; +- inherit hash; +- stripLen = 1; +- extraPrefix = "llm/llama.cpp/"; +- }; +- ++ preparePatch = ++ patch: hash: ++ fetchpatch { ++ url = "file://${src}/llm/patches/${patch}"; ++ inherit hash; ++ stripLen = 1; ++ extraPrefix = "llm/llama.cpp/"; ++ }; + +- accelIsValid = builtins.elem acceleration [ null false "rocm" "cuda" ]; +- validateFallback = lib.warnIf (config.rocmSupport && config.cudaSupport) +- (lib.concatStrings [ +- "both `nixpkgs.config.rocmSupport` and `nixpkgs.config.cudaSupport` are enabled, " +- "but they are mutually exclusive; falling back to cpu" +- ]) +- (!(config.rocmSupport && config.cudaSupport)); +- shouldEnable = assert accelIsValid; +- mode: fallback: +- (acceleration == mode) +- || (fallback && acceleration == null && validateFallback); ++ accelIsValid = builtins.elem acceleration [ ++ null ++ false ++ "rocm" ++ "cuda" ++ ]; ++ validateFallback = lib.warnIf (config.rocmSupport && config.cudaSupport) (lib.concatStrings [ ++ "both `nixpkgs.config.rocmSupport` and `nixpkgs.config.cudaSupport` are enabled, " ++ "but they are mutually exclusive; falling back to cpu" ++ ]) (!(config.rocmSupport && config.cudaSupport)); ++ shouldEnable = ++ assert accelIsValid; ++ mode: fallback: (acceleration == mode) || (fallback && acceleration == null && validateFallback); + + rocmRequested = shouldEnable "rocm" config.rocmSupport; + cudaRequested = shouldEnable "cuda" config.cudaSupport; +@@ -85,7 +89,6 @@ let + enableRocm = rocmRequested && stdenv.isLinux; + enableCuda = cudaRequested && stdenv.isLinux; + +- + rocmLibs = [ + rocmPackages.clr + rocmPackages.hipblas +@@ -95,9 +98,7 @@ let + rocmPackages.rocm-device-libs + rocmPackages.rocm-smi + ]; +- rocmClang = linkFarm "rocm-clang" { +- llvm = rocmPackages.llvm.clang; +- }; ++ rocmClang = linkFarm "rocm-clang" { llvm = rocmPackages.llvm.clang; }; + rocmPath = buildEnv { + name = "rocm-path"; + paths = rocmLibs ++ [ rocmClang ]; +@@ -121,114 +122,125 @@ let + appleFrameworks.MetalPerformanceShaders + ]; + +- wrapperOptions = [ +- # ollama embeds llama-cpp binaries which actually run the ai models +- # these llama-cpp binaries are unaffected by the ollama binary's DT_RUNPATH +- # LD_LIBRARY_PATH is temporarily required to use the gpu +- # until these llama-cpp binaries can have their runpath patched +- "--suffix LD_LIBRARY_PATH : '${addDriverRunpath.driverLink}/lib'" +- ] ++ lib.optionals enableRocm [ +- "--suffix LD_LIBRARY_PATH : '${rocmPath}/lib'" +- "--set-default HIP_PATH '${rocmPath}'" +- ]; ++ wrapperOptions = ++ [ ++ # ollama embeds llama-cpp binaries which actually run the ai models ++ # these llama-cpp binaries are unaffected by the ollama binary's DT_RUNPATH ++ # LD_LIBRARY_PATH is temporarily required to use the gpu ++ # until these llama-cpp binaries can have their runpath patched ++ "--suffix LD_LIBRARY_PATH : '${addDriverRunpath.driverLink}/lib'" ++ ] ++ ++ lib.optionals enableRocm [ ++ "--suffix LD_LIBRARY_PATH : '${rocmPath}/lib'" ++ "--set-default HIP_PATH '${rocmPath}'" ++ ]; + wrapperArgs = builtins.concatStringsSep " " wrapperOptions; + +- + goBuild = +- if enableCuda then +- buildGoModule.override { stdenv = overrideCC stdenv gcc12; } +- else +- buildGoModule; ++ if enableCuda then buildGoModule.override { stdenv = overrideCC stdenv gcc12; } else buildGoModule; + inherit (lib) licenses platforms maintainers; + in +-goBuild ((lib.optionalAttrs enableRocm { +- ROCM_PATH = rocmPath; +- CLBlast_DIR = "${clblast}/lib/cmake/CLBlast"; +-}) // (lib.optionalAttrs enableCuda { +- CUDA_LIB_DIR = "${cudaToolkit}/lib"; +-}) // { +- inherit pname version src vendorHash; +- +- nativeBuildInputs = [ +- cmake +- ] ++ lib.optionals enableRocm [ +- rocmPackages.llvm.bintools +- ] ++ lib.optionals enableCuda [ +- cudaPackages.cuda_nvcc +- ] ++ lib.optionals (enableRocm || enableCuda) [ +- makeWrapper +- autoAddDriverRunpath +- ] ++ lib.optionals stdenv.isDarwin +- metalFrameworks; +- +- buildInputs = lib.optionals enableRocm +- (rocmLibs ++ [ libdrm ]) +- ++ lib.optionals enableCuda [ +- cudaPackages.cuda_cudart +- cudaPackages.cuda_cccl +- cudaPackages.libcublas +- ] ++ lib.optionals stdenv.isDarwin +- metalFrameworks; +- +- patches = [ +- # disable uses of `git` in the `go generate` script +- # ollama's build script assumes the source is a git repo, but nix removes the git directory +- # this also disables necessary patches contained in `ollama/llm/patches/` +- # those patches are added to `llamacppPatches`, and reapplied here in the patch phase +- ./disable-git.patch +- # disable a check that unnecessarily exits compilation during rocm builds +- # since `rocmPath` is in `LD_LIBRARY_PATH`, ollama uses rocm correctly +- ./disable-lib-check.patch +- ] ++ llamacppPatches; +- postPatch = '' +- # replace inaccurate version number with actual release version +- substituteInPlace version/version.go --replace-fail 0.0.0 '${version}' +- ''; +- preBuild = '' +- # disable uses of `git`, since nix removes the git directory +- export OLLAMA_SKIP_PATCHING=true +- # build llama.cpp libraries for ollama +- go generate ./... +- ''; +- postFixup = '' +- # the app doesn't appear functional at the moment, so hide it +- mv "$out/bin/app" "$out/bin/.ollama-app" +- '' + lib.optionalString (enableRocm || enableCuda) '' +- # expose runtime libraries necessary to use the gpu +- wrapProgram "$out/bin/ollama" ${wrapperArgs} +- ''; +- +- ldflags = [ +- "-s" +- "-w" +- "-X=github.com/ollama/ollama/version.Version=${version}" +- "-X=github.com/ollama/ollama/server.mode=release" +- ]; ++goBuild ( ++ (lib.optionalAttrs enableRocm { ++ ROCM_PATH = rocmPath; ++ CLBlast_DIR = "${clblast}/lib/cmake/CLBlast"; ++ }) ++ // (lib.optionalAttrs enableCuda { CUDA_LIB_DIR = "${cudaToolkit}/lib"; }) ++ // { ++ inherit ++ pname ++ version ++ src ++ vendorHash ++ ; ++ ++ nativeBuildInputs = ++ [ cmake ] ++ ++ lib.optionals enableRocm [ rocmPackages.llvm.bintools ] ++ ++ lib.optionals enableCuda [ cudaPackages.cuda_nvcc ] ++ ++ lib.optionals (enableRocm || enableCuda) [ ++ makeWrapper ++ autoAddDriverRunpath ++ ] ++ ++ lib.optionals stdenv.isDarwin metalFrameworks; ++ ++ buildInputs = ++ lib.optionals enableRocm (rocmLibs ++ [ libdrm ]) ++ ++ lib.optionals enableCuda [ ++ cudaPackages.cuda_cudart ++ cudaPackages.cuda_cccl ++ cudaPackages.libcublas ++ ] ++ ++ lib.optionals stdenv.isDarwin metalFrameworks; ++ ++ patches = [ ++ # disable uses of `git` in the `go generate` script ++ # ollama's build script assumes the source is a git repo, but nix removes the git directory ++ # this also disables necessary patches contained in `ollama/llm/patches/` ++ # those patches are added to `llamacppPatches`, and reapplied here in the patch phase ++ ./disable-git.patch ++ # disable a check that unnecessarily exits compilation during rocm builds ++ # since `rocmPath` is in `LD_LIBRARY_PATH`, ollama uses rocm correctly ++ ./disable-lib-check.patch ++ ] ++ llamacppPatches; ++ postPatch = '' ++ # replace inaccurate version number with actual release version ++ substituteInPlace version/version.go --replace-fail 0.0.0 '${version}' ++ ''; ++ preBuild = '' ++ # disable uses of `git`, since nix removes the git directory ++ export OLLAMA_SKIP_PATCHING=true ++ # build llama.cpp libraries for ollama ++ go generate ./... ++ ''; ++ postFixup = ++ '' ++ # the app doesn't appear functional at the moment, so hide it ++ mv "$out/bin/app" "$out/bin/.ollama-app" ++ '' ++ + lib.optionalString (enableRocm || enableCuda) '' ++ # expose runtime libraries necessary to use the gpu ++ wrapProgram "$out/bin/ollama" ${wrapperArgs} ++ ''; ++ ++ ldflags = [ ++ "-s" ++ "-w" ++ "-X=github.com/ollama/ollama/version.Version=${version}" ++ "-X=github.com/ollama/ollama/server.mode=release" ++ ]; + +- passthru.tests = { +- inherit ollama; +- service = nixosTests.ollama; +- version = testers.testVersion { +- inherit version; +- package = ollama; ++ passthru.tests = ++ { ++ inherit ollama; ++ service = nixosTests.ollama; ++ version = testers.testVersion { ++ inherit version; ++ package = ollama; ++ }; ++ } ++ // lib.optionalAttrs stdenv.isLinux { ++ inherit ollama-rocm ollama-cuda; ++ service-cuda = nixosTests.ollama-cuda; ++ service-rocm = nixosTests.ollama-rocm; ++ }; ++ ++ meta = { ++ description = ++ "Get up and running with large language models locally" ++ + lib.optionalString rocmRequested ", using ROCm for AMD GPU acceleration" ++ + lib.optionalString cudaRequested ", using CUDA for NVIDIA GPU acceleration"; ++ homepage = "https://github.com/ollama/ollama"; ++ changelog = "https://github.com/ollama/ollama/releases/tag/v${version}"; ++ license = licenses.mit; ++ platforms = if (rocmRequested || cudaRequested) then platforms.linux else platforms.unix; ++ mainProgram = "ollama"; ++ maintainers = with maintainers; [ ++ abysssol ++ dit7ya ++ elohmeier ++ roydubnium ++ ]; + }; +- } // lib.optionalAttrs stdenv.isLinux { +- inherit ollama-rocm ollama-cuda; +- service-cuda = nixosTests.ollama-cuda; +- service-rocm = nixosTests.ollama-rocm; +- }; +- +- meta = { +- description = "Get up and running with large language models locally" +- + lib.optionalString rocmRequested ", using ROCm for AMD GPU acceleration" +- + lib.optionalString cudaRequested ", using CUDA for NVIDIA GPU acceleration"; +- homepage = "https://github.com/ollama/ollama"; +- changelog = "https://github.com/ollama/ollama/releases/tag/v${version}"; +- license = licenses.mit; +- platforms = +- if (rocmRequested || cudaRequested) then platforms.linux +- else platforms.unix; +- mainProgram = "ollama"; +- maintainers = with maintainers; [ abysssol dit7ya elohmeier roydubnium ]; +- }; +-}) ++ } ++) + +From d86d9340c5314a10d0ba3e7ef498d108def03538 Mon Sep 17 00:00:00 2001 +From: Pol Dellaiera +Date: Tue, 23 Jul 2024 11:08:55 +0200 +Subject: [PATCH 3/4] ollama: move the assert after the top level parameters + +--- + pkgs/by-name/ol/ollama/package.nix | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +diff --git a/pkgs/by-name/ol/ollama/package.nix b/pkgs/by-name/ol/ollama/package.nix +index 7b1f2c88e92e591..c325192a583bbe7 100644 +--- a/pkgs/by-name/ol/ollama/package.nix ++++ b/pkgs/by-name/ol/ollama/package.nix +@@ -30,6 +30,13 @@ + acceleration ? null, + }: + ++assert builtins.elem acceleration [ ++ null ++ false ++ "rocm" ++ "cuda" ++]; ++ + let + pname = "ollama"; + # don't forget to invalidate all hashes each update +@@ -69,18 +76,11 @@ let + extraPrefix = "llm/llama.cpp/"; + }; + +- accelIsValid = builtins.elem acceleration [ +- null +- false +- "rocm" +- "cuda" +- ]; + validateFallback = lib.warnIf (config.rocmSupport && config.cudaSupport) (lib.concatStrings [ + "both `nixpkgs.config.rocmSupport` and `nixpkgs.config.cudaSupport` are enabled, " + "but they are mutually exclusive; falling back to cpu" + ]) (!(config.rocmSupport && config.cudaSupport)); + shouldEnable = +- assert accelIsValid; + mode: fallback: (acceleration == mode) || (fallback && acceleration == null && validateFallback); + + rocmRequested = shouldEnable "rocm" config.rocmSupport; + +From 1b3b0049526c02ef652b2bc6bdca5042c6a59f31 Mon Sep 17 00:00:00 2001 +From: Pol Dellaiera +Date: Tue, 23 Jul 2024 11:51:43 +0200 +Subject: [PATCH 4/4] ollama: replace variable with `with` keyword + +--- + pkgs/by-name/ol/ollama/package.nix | 11 +++++------ + 1 file changed, 5 insertions(+), 6 deletions(-) + +diff --git a/pkgs/by-name/ol/ollama/package.nix b/pkgs/by-name/ol/ollama/package.nix +index c325192a583bbe7..a1f4dcc2062923f 100644 +--- a/pkgs/by-name/ol/ollama/package.nix ++++ b/pkgs/by-name/ol/ollama/package.nix +@@ -114,12 +114,11 @@ let + ]; + }; + +- appleFrameworks = darwin.apple_sdk_11_0.frameworks; +- metalFrameworks = [ +- appleFrameworks.Accelerate +- appleFrameworks.Metal +- appleFrameworks.MetalKit +- appleFrameworks.MetalPerformanceShaders ++ metalFrameworks = with darwin.apple_sdk_11_0.frameworks; [ ++ Accelerate ++ Metal ++ MetalKit ++ MetalPerformanceShaders + ]; + + wrapperOptions = diff --git a/patches/quirc.patch b/patches/quirc.patch new file mode 100644 index 0000000..78cd119 --- /dev/null +++ b/patches/quirc.patch @@ -0,0 +1,30 @@ +From 2844e6ffb1a680752a0ec7d9615793f00874707f Mon Sep 17 00:00:00 2001 +From: OPNA2608 +Date: Sun, 21 Jul 2024 15:45:17 +0200 +Subject: [PATCH] quirc: Fix FTBFS on Linux + +https://github.com/dlbeer/quirc/commit/2c350d8aaf37246e538a2c93b2cce8c78600d2fc already includes a cp of libquirc.so, we can drop the Linux-only postInstall block. +--- + pkgs/tools/graphics/quirc/default.nix | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +diff --git a/pkgs/tools/graphics/quirc/default.nix b/pkgs/tools/graphics/quirc/default.nix +index 938b9c37872f0f..b2d1e795155a35 100644 +--- a/pkgs/tools/graphics/quirc/default.nix ++++ b/pkgs/tools/graphics/quirc/default.nix +@@ -50,13 +50,11 @@ stdenv.mkDerivation (finalAttrs: { + postInstall = '' + # don't install static library + rm $out/lib/libquirc.a +- '' + (if stdenv.isDarwin then '' ++ '' + lib.optionalString stdenv.isDarwin '' + # Set absolute install name to avoid the need for DYLD_LIBRARY_PATH + dylib=$out/lib/libquirc.${finalAttrs.version}.dylib + ${stdenv.cc.targetPrefix}install_name_tool -id "$dylib" "$dylib" +- '' else '' +- ln -s $out/lib/libquirc.so.* $out/lib/libquirc.so +- ''); ++ ''; + + meta = { + description = "Small QR code decoding library"; diff --git a/profiles/servers/ollama.nix b/profiles/servers/ollama.nix index e015281..82d8245 100644 --- a/profiles/servers/ollama.nix +++ b/profiles/servers/ollama.nix @@ -41,7 +41,9 @@ in { ENABLE_RAG_WEB_SEARCH = "True"; RAG_WEB_SEARCH_ENGINE = "searxng"; SEARXNG_QUERY_URL = "http://127.0.0.1:${searx-port}/search?q="; - + # fix crush on web search + # RAG_EMBEDDING_ENGINE = "ollama"; + # RAG_EMBEDDING_MODEL = "mxbai-embed-large:latest"; }; }; services.searx = {