gpt4all more config stuff

This commit is contained in:
2024-09-20 10:29:35 -04:00
parent b26a8b9d10
commit b45a145f98
5 changed files with 149 additions and 104 deletions

View File

@@ -8,6 +8,7 @@
imports = [
./no-gui.nix
# ./progs/librewolf.nix
./progs/gpt4all.nix
];
nixpkgs.config.allowUnfreePredicate =
@@ -17,120 +18,82 @@
"factorio-alpha"
];
home.packages =
let
#stolen from: https://stackoverflow.com/a/42398526
optimizeWithFlags =
pkg: flags:
pkgs.lib.overrideDerivation pkg (
old:
let
newflags = pkgs.lib.foldl' (acc: x: "${acc} ${x}") "" flags;
oldflags = if (pkgs.lib.hasAttr "NIX_CFLAGS_COMPILE" old) then "${old.NIX_CFLAGS_COMPILE}" else "";
in
{
NIX_CFLAGS_COMPILE = "${oldflags} ${newflags}";
stdenv = pkgs.clangStdenv;
}
);
in
with pkgs;
[
#calculator
gnome-calculator
home.packages = with pkgs; [
#calculator
gnome-calculator
#productivity stuff
libreoffice
hunspell # spellcheck
hunspellDicts.en_US # spellcheck dictionary
#productivity stuff
libreoffice
hunspell # spellcheck
hunspellDicts.en_US # spellcheck dictionary
#video and audio downloading
parabolic
#video and audio downloading
parabolic
#soulseek client
nicotine-plus
#soulseek client
nicotine-plus
#dark web browsing deep web browsing
tor-browser
#dark web browsing deep web browsing
tor-browser
#audio editing
audacity
#audio editing
audacity
#fonts
noto-fonts
noto-fonts-emoji
liberation_ttf
nerdfonts
jetbrains-mono
#fonts
noto-fonts
noto-fonts-emoji
liberation_ttf
nerdfonts
jetbrains-mono
#for ebook reading
foliate
#for ebook reading
foliate
#audio mixer (pavucontrol but for pipewire)
pwvucontrol
#audio mixer (pavucontrol but for pipewire)
pwvucontrol
#minecraft launcher
prismlauncher
#minecraft launcher
prismlauncher
mpv
mumble
system76-keyboard-configurator
mission-center
mpv
mumble
system76-keyboard-configurator
mission-center
#jellyfin
finamp # music player
delfin # jellyfin client
#jellyfin
finamp # music player
delfin # jellyfin client
signal-desktop
signal-desktop
#accounting
gnucash
#accounting
gnucash
imagemagick
inkscape
nomacs
imagemagick
inkscape
nomacs
nautilus
nautilus
lrcget
lrcget
#openstreetmap contributing
josm
#openstreetmap contributing
josm
gparted
gnome-disk-utility
gparted
gnome-disk-utility
#small nicities
wl-clipboard # wl-copy & wl-paste
libnotify # notifications library
xdg-utils # xdg utils
#small nicities
wl-clipboard # wl-copy & wl-paste
libnotify # notifications library
xdg-utils # xdg utils
puddletag
puddletag
inputs.zen-browser.packages."${pkgs.system}".specific
inputs.zen-browser.packages."${pkgs.system}".specific
(factorio.override (import ./secrets/factorio.nix))
(optimizeWithFlags
(gpt4all.overrideAttrs {
src = fetchFromGitHub {
fetchSubmodules = true;
owner = "nomic-ai";
repo = "gpt4all";
rev = "HEAD";
sha256 = "lGvxTOBg7/UgrCqeAFNFFXD9VjpUk3IVCktdUYuF6Eo=";
};
patches = [ ./gpt4all-HEAD-embeddings-model.patch ];
})
[
"-Ofast"
"-march=native"
"-mtune=native"
"-fno-protect-parens"
"-fno-finite-math-only" # https://github.com/ggerganov/llama.cpp/pull/7154#issuecomment-2143844461
]
)
];
(factorio.override (import ./secrets/factorio.nix))
];
# make chromium-based stuff use wayland
home.file.".config/chromium-flags.conf".text = "--ozone-platform-hint=auto";