cleanup
This commit is contained in:
@@ -4,20 +4,20 @@
|
||||
enable = true;
|
||||
package = pkgs.alacritty;
|
||||
settings = {
|
||||
#use the fish shell
|
||||
# use the fish shell
|
||||
shell.program = "${pkgs.fish}/bin/fish";
|
||||
|
||||
#some programs can't handle alacritty
|
||||
# some programs can't handle alacritty
|
||||
env.TERM = "xterm-256color";
|
||||
|
||||
window = {
|
||||
#using a window manager, no decorations needed
|
||||
# using a window manager, no decorations needed
|
||||
decorations = "none";
|
||||
|
||||
#semi-transparent
|
||||
# semi-transparent
|
||||
opacity = 0.95;
|
||||
|
||||
#padding between the content of the terminal and the edge
|
||||
# padding between the content of the terminal and the edge
|
||||
padding = {
|
||||
x = 10;
|
||||
y = 10;
|
||||
@@ -58,7 +58,7 @@
|
||||
glyph_offset.y = 0;
|
||||
};
|
||||
|
||||
#color scheme
|
||||
# color scheme
|
||||
colors =
|
||||
let
|
||||
normal = {
|
||||
|
||||
@@ -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 = (
|
||||
optimizeWithFlags
|
||||
(pkgs.gpt4all.overrideAttrs (old: {
|
||||
version = "3.4.0-dev0";
|
||||
version = "3.4.0";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
fetchSubmodules = true;
|
||||
owner = "nomic-ai";
|
||||
repo = "gpt4all";
|
||||
rev = "HEAD";
|
||||
sha256 = "YM/RdxklwIsTjD6xahZIcQoMnoabsmpQwDPEihm+h8A=";
|
||||
rev = "v3.4.0";
|
||||
sha256 = "yXp9MyezXQJWUyEvyXc6++/Ow/NNqs1cjLIpEuKDrn0=";
|
||||
};
|
||||
|
||||
patches = old.patches ++ [
|
||||
@@ -61,53 +54,62 @@ let
|
||||
);
|
||||
in
|
||||
{
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
home.packages = [
|
||||
gpt4all_package
|
||||
];
|
||||
|
||||
home.file = lib.recursiveUpdate {
|
||||
".config/nomic.ai/GPT4All.ini".text =
|
||||
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.";
|
||||
in
|
||||
''
|
||||
[General]
|
||||
chatTheme=Dark
|
||||
height=940
|
||||
suggestionMode=Off
|
||||
threadCount=8
|
||||
uniqueId=7096f2d2-448d-4272-a132-d37e77f8a781
|
||||
userDefaultModel=${
|
||||
# select the first element of `models` to be the default model
|
||||
(builtins.elemAt models 0).name
|
||||
}
|
||||
width=1472
|
||||
x=0
|
||||
y=0
|
||||
home.file =
|
||||
lib.recursiveUpdate
|
||||
{
|
||||
".config/nomic.ai/GPT4All.ini".text =
|
||||
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.";
|
||||
in
|
||||
''
|
||||
[General]
|
||||
chatTheme=Dark
|
||||
height=940
|
||||
suggestionMode=Off
|
||||
threadCount=8
|
||||
uniqueId=7096f2d2-448d-4272-a132-d37e77f8a781
|
||||
userDefaultModel=${
|
||||
# select the first element of `models` to be the default model
|
||||
(builtins.elemAt models 0).name
|
||||
}
|
||||
width=1472
|
||||
x=0
|
||||
y=0
|
||||
|
||||
[download]
|
||||
lastVersionStarted=${gpt4all_package.version}
|
||||
''
|
||||
+ (lib.concatStrings (
|
||||
map (model: ''
|
||||
[model-${model.name}]
|
||||
contextLength=${model.context_length}
|
||||
filename=${model.name}
|
||||
maxLength=${model.gen_length}
|
||||
promptBatchSize=256
|
||||
promptTemplate=<|im_start|>user\n%1<|im_end|>\n<|im_start|>assistant\n
|
||||
systemPrompt="<|im_start|>system\n${
|
||||
# replace newlines with the string "\n" for gpt4all to properly parse
|
||||
builtins.replaceStrings [ "\n" ] [ "\\n" ] system_prompt
|
||||
}<|im_end|>
|
||||
\n"
|
||||
'') models
|
||||
))
|
||||
+ ''
|
||||
[network]
|
||||
isActive=true
|
||||
usageStatsActive=true
|
||||
'';
|
||||
} model_files;
|
||||
[download]
|
||||
lastVersionStarted=${gpt4all_package.version}
|
||||
''
|
||||
+ (lib.concatStrings (
|
||||
map (model: ''
|
||||
[model-${model.name}]
|
||||
contextLength=${model.context_length}
|
||||
filename=${model.name}
|
||||
maxLength=${model.gen_length}
|
||||
promptBatchSize=256
|
||||
promptTemplate=<|im_start|>user\n%1<|im_end|>\n<|im_start|>assistant\n
|
||||
systemPrompt="<|im_start|>system\n${
|
||||
# replace newlines with the string "\n" for gpt4all to properly parse
|
||||
builtins.replaceStrings [ "\n" ] [ "\\n" ] system_prompt
|
||||
}<|im_end|>
|
||||
\n"
|
||||
'') models
|
||||
))
|
||||
+ ''
|
||||
[network]
|
||||
isActive=true
|
||||
usageStatsActive=true
|
||||
'';
|
||||
}
|
||||
(
|
||||
builtins.listToAttrs (
|
||||
map (f: {
|
||||
name = ".local/share/nomic.ai/GPT4All/${f.name}";
|
||||
value.source = f.source;
|
||||
}) models
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user