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

@ -15,10 +15,10 @@
home.stateVersion = "24.11"; home.stateVersion = "24.11";
home.packages = with pkgs; [ home.packages = with pkgs; [
#hex viewer # hex viewer
hexyl hexyl
#rust stuff # rust stuff
(rust-bin.selectLatestNightlyWith ( (rust-bin.selectLatestNightlyWith (
toolchain: toolchain:
toolchain.default.override { toolchain.default.override {
@ -30,30 +30,30 @@
"rust-std" "rust-std"
"cargo" "cargo"
]; ];
#thumbv7m-none-eabi target for stm32 # thumbv7m-none-eabi target for stm32
targets = [ "thumbv7m-none-eabi" ]; targets = [ "thumbv7m-none-eabi" ];
} }
)) ))
cargo-expand cargo-expand
#find typos in code # find typos in code
typos typos
#python formatter # python formatter
ruff ruff
#for website generation # for website generation
hugo hugo
#java development # java development
google-java-format # formatter google-java-format # formatter
jdk # java jdk # java
jdt-language-server # lsp server jdt-language-server # lsp server
#for benchmaking stuff # for benchmaking stuff
hyperfine hyperfine
#replacements for common posix tools # replacements for common posix tools
eza # ls replacement eza # ls replacement
bat # pretty `cat` clone bat # pretty `cat` clone
delta # viewer for `git` and `diff` output delta # viewer for `git` and `diff` output
@ -63,13 +63,13 @@
tldr # `man` but more straight-forward and simpler tldr # `man` but more straight-forward and simpler
ripgrep # grep, but written in rust, respects .gitignore, and very very fast, command is `rg` ripgrep # grep, but written in rust, respects .gitignore, and very very fast, command is `rg`
#adds `sensors` command # adds `sensors` command
lm_sensors lm_sensors
#rssfeed # rssfeed
newsboat newsboat
#HTML/CSS/JSON/ESLint language servers # HTML/CSS/JSON/ESLint language servers
vscode-langservers-extracted vscode-langservers-extracted
just just
@ -85,13 +85,13 @@
sshfs sshfs
#nix formatter # nix formatter
nixfmt-rfc-style nixfmt-rfc-style
#serial viewer # serial viewer
minicom minicom
#"~~matt's~~ my trace route" # "~~matt's~~ my trace route"
mtr mtr
file file
@ -100,7 +100,7 @@
ffmpeg-full ffmpeg-full
#microcontroller tooling # microcontroller tooling
probe-rs probe-rs
(python312.withPackages ( (python312.withPackages (
@ -118,11 +118,9 @@
yaml-language-server # yaml lsp yaml-language-server # yaml lsp
marksman # markdown lsp marksman # markdown lsp
#clang-format and clang-tidy # clang-format and clang-tidy
clang-tools clang-tools
# inputs.binsider.packages.${pkgs.system}.binsider
lldb lldb
fio fio
@ -140,37 +138,37 @@
rustflags = ["-C", "link-arg=-fuse-ld=${pkgs.mold}/bin/mold"] rustflags = ["-C", "link-arg=-fuse-ld=${pkgs.mold}/bin/mold"]
''; '';
#default applications # default applications
home.sessionVariables = { home.sessionVariables = {
EDITOR = "hx"; EDITOR = "hx";
}; };
#feed reader # feed reader
programs.newsboat = { programs.newsboat = {
enable = true; enable = true;
#store rss feeds in a separate file because it's *a lot* # store rss feeds in a separate file because it's *a lot*
urls = import ./progs/rss.nix; urls = import ./progs/rss.nix;
}; };
#git (self explanatory) # git (self explanatory)
programs.git = { programs.git = {
enable = true; enable = true;
package = pkgs.git; package = pkgs.git;
userName = "Simon Gardling"; userName = "Simon Gardling";
userEmail = "titaniumtown@proton.me"; userEmail = "titaniumtown@proton.me";
#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;
}; };
#gpg signing keys # gpg signing keys
signing = { signing = {
key = "9AB28AC10ECE533D"; key = "9AB28AC10ECE533D";
signByDefault = true; signByDefault = 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

@ -4,20 +4,20 @@
enable = true; enable = true;
package = pkgs.alacritty; package = pkgs.alacritty;
settings = { settings = {
#use the fish shell # use the fish shell
shell.program = "${pkgs.fish}/bin/fish"; shell.program = "${pkgs.fish}/bin/fish";
#some programs can't handle alacritty # some programs can't handle alacritty
env.TERM = "xterm-256color"; env.TERM = "xterm-256color";
window = { window = {
#using a window manager, no decorations needed # using a window manager, no decorations needed
decorations = "none"; decorations = "none";
#semi-transparent # semi-transparent
opacity = 0.95; opacity = 0.95;
#padding between the content of the terminal and the edge # padding between the content of the terminal and the edge
padding = { padding = {
x = 10; x = 10;
y = 10; y = 10;
@ -58,7 +58,7 @@
glyph_offset.y = 0; glyph_offset.y = 0;
}; };
#color scheme # color scheme
colors = colors =
let let
normal = { normal = {

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
)
);
} }