This commit is contained in:
Simon Gardling 2024-10-09 15:25:12 -04:00
parent 75afef7bd3
commit 7ba187dff3
Signed by: titaniumtown
GPG Key ID: 9AB28AC10ECE533D
5 changed files with 98 additions and 159 deletions

View File

@ -25,27 +25,6 @@
"type": "github" "type": "github"
} }
}, },
"binsider": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1728371133,
"narHash": "sha256-Di+CMkvUU/GhRC6OWPcoA/Odb3a7HBgkMvjUhWNv3wM=",
"owner": "orhun",
"repo": "binsider",
"rev": "4bc6b7a117743a8b8ddf8595e58c3596f94dd396",
"type": "github"
},
"original": {
"owner": "orhun",
"repo": "binsider",
"type": "github"
}
},
"darwin": { "darwin": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -86,24 +65,6 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils": {
"inputs": {
"systems": "systems_2"
},
"locked": {
"lastModified": 1726560853,
"narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"home-manager": { "home-manager": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -137,11 +98,11 @@
"xwayland-satellite-unstable": "xwayland-satellite-unstable" "xwayland-satellite-unstable": "xwayland-satellite-unstable"
}, },
"locked": { "locked": {
"lastModified": 1728372489, "lastModified": 1728467408,
"narHash": "sha256-4Lm/bSzK5si/VM3E83d2xJDs5Es61TIfzNhK+dZHCl8=", "narHash": "sha256-pOYTUPWlxuK8Y4Q7UiDeXJRVallbRrGFtwQ4M+biZnM=",
"owner": "sodiboo", "owner": "sodiboo",
"repo": "niri-flake", "repo": "niri-flake",
"rev": "9d1699bb73790d48345843ea11bd4fee5db052dd", "rev": "321a4a598e765862874ccddbc4d1b68941a0b5ee",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -170,11 +131,11 @@
"niri-unstable": { "niri-unstable": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1728277759, "lastModified": 1728463806,
"narHash": "sha256-pMUMUo4vMcdjU4d8wuEHI5i8fW8SzYptR3GZPeDru1c=", "narHash": "sha256-RHfieDDCEjPxtevtpt/IyxBaw4ISjjyY0WGzw7zYCMg=",
"owner": "YaLTeR", "owner": "YaLTeR",
"repo": "niri", "repo": "niri",
"rev": "03c603918d817762ee95d21ea15a854adf47886e", "rev": "e24723125f5ef91983735043fba893a940469686",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -213,11 +174,11 @@
}, },
"nixpkgs-stable": { "nixpkgs-stable": {
"locked": { "locked": {
"lastModified": 1728193676, "lastModified": 1728328465,
"narHash": "sha256-PbDWAIjKJdlVg+qQRhzdSor04bAPApDqIv2DofTyynk=", "narHash": "sha256-a0a0M1TmXMK34y3M0cugsmpJ4FJPT/xsblhpiiX1CXo=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "ecbc1ca8ffd6aea8372ad16be9ebbb39889e55b6", "rev": "1bfbbbe5bbf888d675397c66bfdb275d0b99361c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -230,7 +191,6 @@
"root": { "root": {
"inputs": { "inputs": {
"agenix": "agenix", "agenix": "agenix",
"binsider": "binsider",
"home-manager": "home-manager", "home-manager": "home-manager",
"niri": "niri", "niri": "niri",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
@ -245,11 +205,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1728354625, "lastModified": 1728461096,
"narHash": "sha256-r+Sa1NRRT7LXKzCaVaq75l1GdZcegODtF06uaxVVVbI=", "narHash": "sha256-cd0cXB85B3kGpm+iumP9xCnqFErspXL9Z/2X59kQ6c4=",
"owner": "oxalica", "owner": "oxalica",
"repo": "rust-overlay", "repo": "rust-overlay",
"rev": "d216ade5a0091ce60076bf1f8bc816433a1fc5da", "rev": "e310b9bd71fa6c6a9fec0a8cf5af43ce798a0ad6",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -273,21 +233,6 @@
"type": "github" "type": "github"
} }
}, },
"systems_2": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"xwayland-satellite-stable": { "xwayland-satellite-stable": {
"flake": false, "flake": false,
"locked": { "locked": {

View File

@ -25,11 +25,6 @@
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
binsider = {
url = "github:orhun/binsider";
inputs.nixpkgs.follows = "nixpkgs";
};
zen-browser = { zen-browser = {
# https://github.com/NixOS/nixpkgs/pull/347222 # https://github.com/NixOS/nixpkgs/pull/347222
url = "github:matthewpi/nixpkgs/zen-browser"; url = "github:matthewpi/nixpkgs/zen-browser";

View File

@ -121,8 +121,6 @@
# clang-format and clang-tidy # clang-format and clang-tidy
clang-tools clang-tools
# inputs.binsider.packages.${pkgs.system}.binsider
lldb lldb
fio fio
@ -162,9 +160,9 @@
# better way to view diffs # better way to view diffs
delta.enable = true; delta.enable = true;
#master -> main
extraConfig = { extraConfig = {
init = { init = {
# master -> main
defaultBranch = "main"; defaultBranch = "main";
}; };
push.autoSetupRemote = true; push.autoSetupRemote = true;
@ -186,6 +184,5 @@
${pkgs.gnupg}/bin/gpg --import ${config.age.secrets.gnupg.path} ${pkgs.gnupg}/bin/gpg --import ${config.age.secrets.gnupg.path}
''; '';
# Let Home Manager install and manage itself.
programs.home-manager.enable = true; programs.home-manager.enable = true;
} }

View File

@ -27,23 +27,16 @@ let
} }
); );
model_files = builtins.listToAttrs (
map (f: {
name = ".local/share/nomic.ai/GPT4All/${f.name}";
value.source = f.source;
}) models
);
gpt4all_package = ( gpt4all_package = (
optimizeWithFlags optimizeWithFlags
(pkgs.gpt4all.overrideAttrs (old: { (pkgs.gpt4all.overrideAttrs (old: {
version = "3.4.0-dev0"; version = "3.4.0";
src = pkgs.fetchFromGitHub { src = pkgs.fetchFromGitHub {
fetchSubmodules = true; fetchSubmodules = true;
owner = "nomic-ai"; owner = "nomic-ai";
repo = "gpt4all"; repo = "gpt4all";
rev = "HEAD"; rev = "v3.4.0";
sha256 = "YM/RdxklwIsTjD6xahZIcQoMnoabsmpQwDPEihm+h8A="; sha256 = "yXp9MyezXQJWUyEvyXc6++/Ow/NNqs1cjLIpEuKDrn0=";
}; };
patches = old.patches ++ [ patches = old.patches ++ [
@ -61,12 +54,13 @@ let
); );
in in
{ {
nixpkgs.config.allowUnfree = true;
home.packages = [ home.packages = [
gpt4all_package gpt4all_package
]; ];
home.file = lib.recursiveUpdate { home.file =
lib.recursiveUpdate
{
".config/nomic.ai/GPT4All.ini".text = ".config/nomic.ai/GPT4All.ini".text =
let let
system_prompt = "You are an expert LLM who is thoughtful and works step-by-step from first principles derive an answer to the user's prompt. For each step, title the step and begin showing your work, then decide if your work is comprehensive and if you're ready to provide your final answer. Make sure to exhaust ALL POSSIBILITIES before answering. INTERNAL REASONING STEPS ARE NOT SHOWN TO THE USER, ONLY A \"Final Answer\" SECTION WILL BE SHOWN TO THE USER. USE AS MANY REASONING STEPS AS POSSIBLE. EXPLORE ALTERNATE ANSWERS AND CONSIDER THAT YOUR ANSWER OR ANY ASSUMPTIONS MAY BE WRONG. IDENTIFY POSSIBLE ERRORS IN YOUR REASONING AND WHERE SUCH ERRORS MAY BE. FULLY TEST ALL OTHER POSSIBILITIES. YOU CAN BE WRONG. SHOW YOUR WORK WHEN RE-EXAMINING."; system_prompt = "You are an expert LLM who is thoughtful and works step-by-step from first principles derive an answer to the user's prompt. For each step, title the step and begin showing your work, then decide if your work is comprehensive and if you're ready to provide your final answer. Make sure to exhaust ALL POSSIBILITIES before answering. INTERNAL REASONING STEPS ARE NOT SHOWN TO THE USER, ONLY A \"Final Answer\" SECTION WILL BE SHOWN TO THE USER. USE AS MANY REASONING STEPS AS POSSIBLE. EXPLORE ALTERNATE ANSWERS AND CONSIDER THAT YOUR ANSWER OR ANY ASSUMPTIONS MAY BE WRONG. IDENTIFY POSSIBLE ERRORS IN YOUR REASONING AND WHERE SUCH ERRORS MAY BE. FULLY TEST ALL OTHER POSSIBILITIES. YOU CAN BE WRONG. SHOW YOUR WORK WHEN RE-EXAMINING.";
@ -109,5 +103,13 @@ in
isActive=true isActive=true
usageStatsActive=true usageStatsActive=true
''; '';
} model_files; }
(
builtins.listToAttrs (
map (f: {
name = ".local/share/nomic.ai/GPT4All/${f.name}";
value.source = f.source;
}) models
)
);
} }