Merge branch 'master' of https://gitea.thecrazyinsanity.win/TheCrazyInsanity/nixos-configv3
This commit is contained in:
@@ -20,6 +20,66 @@
|
||||
];
|
||||
nix.package = pkgs.lixPackageSets.stable.lix;
|
||||
|
||||
nixpkgs.config.packageOverrides = pkgs: {
|
||||
|
||||
# Stolen from https://www.nijho.lt/post/llama-nixos/
|
||||
llama-cpp =
|
||||
(pkgs.llama-cpp.override {
|
||||
cudaSupport = true;
|
||||
rocmSupport = false;
|
||||
metalSupport = false;
|
||||
# Enable BLAS for optimized CPU layer performance (OpenBLAS)
|
||||
# This is crucial for models using split-mode or CPU offloading
|
||||
blasSupport = true;
|
||||
}).overrideAttrs
|
||||
(oldAttrs: rec {
|
||||
version = "8184";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "aagit";
|
||||
repo = "llama.cpp";
|
||||
# tag = "b${version}";
|
||||
rev = "6ebf2e0d00d31acfc1a1fa9662e9a7d38bd07bf7"; # https://github.com/ggml-org/llama.cpp/pull/19970
|
||||
hash = "sha256-xryajW0Cs1d+WDijspMTW21FDaZP9Grkb+uErMQCQ48=";
|
||||
leaveDotGit = true;
|
||||
postFetch = ''
|
||||
git -C "$out" rev-parse --short HEAD > $out/COMMIT
|
||||
find "$out" -name .git -print0 | xargs -0 rm -rf
|
||||
'';
|
||||
};
|
||||
# Must update npm deps hash to match the new version's webui dependencies
|
||||
npmDepsHash = "sha256-FKjoZTKm0ddoVdpxzYrRUmTiuafEfbKc4UD2fz2fb8A=";
|
||||
# Enable native CPU optimizations for massively better CPU performance
|
||||
# This enables AVX, AVX2, AVX-512, FMA, etc. for your specific CPU
|
||||
# NOTE: This is intentionally opposite of nixpkgs (which uses -DGGML_NATIVE=off
|
||||
# for reproducible builds). We sacrifice portability for faster CPU layers.
|
||||
cmakeFlags = (oldAttrs.cmakeFlags or [ ]) ++ [
|
||||
"-DGGML_NATIVE=ON"
|
||||
"-DCMAKE_CUDA_ARCHITECTURES=86" # RTX 3090 - needed since sandbox has no GPU
|
||||
];
|
||||
|
||||
# Disable Nix's NIX_ENFORCE_NO_NATIVE which strips -march=native flags
|
||||
# See: https://github.com/NixOS/nixpkgs/issues/357736
|
||||
# See: https://github.com/NixOS/nixpkgs/pull/377484 (intentionally contradicts this)
|
||||
preConfigure = ''
|
||||
export NIX_ENFORCE_NO_NATIVE=0
|
||||
${oldAttrs.preConfigure or ""}
|
||||
'';
|
||||
});
|
||||
|
||||
# llama-swap from GitHub releases
|
||||
llama-swap = pkgs.runCommand "llama-swap" { } ''
|
||||
mkdir -p $out/bin
|
||||
tar -xzf ${
|
||||
pkgs.fetchurl {
|
||||
url = "https://github.com/mostlygeek/llama-swap/releases/download/v190/llama-swap_190_linux_amd64.tar.gz";
|
||||
hash = "sha256-WAfmJ4YiVH/UYq++l2Ut6oLqkd270HgG7eV+6FG/0Oc=";
|
||||
}
|
||||
} -C $out/bin
|
||||
chmod +x $out/bin/llama-swap
|
||||
'';
|
||||
|
||||
};
|
||||
|
||||
# 🇺🇸
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
i18n.extraLocaleSettings = {
|
||||
@@ -57,7 +117,7 @@
|
||||
jack.enable = true;
|
||||
};
|
||||
|
||||
programs.adb.enable = true; # Bit heavy but you never know when you might need it...
|
||||
# programs.adb.enable = true; # Bit heavy but you never know when you might need it...
|
||||
|
||||
users.users.laythe = {
|
||||
isNormalUser = true;
|
||||
@@ -110,11 +170,11 @@
|
||||
environment.systemPackages = with pkgs; [
|
||||
git
|
||||
wget
|
||||
wineWowPackages.stable # Heavy but really annoying to not have when you need it
|
||||
wineWow64Packages.stable # Heavy but really annoying to not have when you need it
|
||||
winetricks
|
||||
gparted
|
||||
unrar
|
||||
electrum
|
||||
# electrum
|
||||
qpwgraph
|
||||
libimobiledevice
|
||||
ifuse
|
||||
@@ -144,6 +204,7 @@
|
||||
xmodmap
|
||||
nixfmt
|
||||
units
|
||||
android-tools
|
||||
];
|
||||
|
||||
services.usbmuxd = {
|
||||
|
||||
Reference in New Issue
Block a user