Extended llm; Fixed issues do to bug in Home Manager 25.05 and above
This commit is contained in:
@@ -1,16 +1,36 @@
|
|||||||
{ pkgs, inputs, self, primaryUser, ... }: {
|
{
|
||||||
imports = [ ./homebrew.nix ./settings.nix ./yabai.nix ];
|
pkgs,
|
||||||
|
primaryUser,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./settings.nix
|
||||||
|
./homebrew.nix
|
||||||
|
./yabai.nix
|
||||||
|
./fonts.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
home-manager.users.${primaryUser}.targets.darwin = {
|
||||||
|
linkApps.enable = true;
|
||||||
|
copyApps.enable = false;
|
||||||
|
};
|
||||||
|
|
||||||
# nix config
|
# nix config
|
||||||
nix = {
|
nix = {
|
||||||
settings = {
|
settings = {
|
||||||
experimental-features = [ "nix-command" "flakes" ];
|
experimental-features = [
|
||||||
|
"nix-command"
|
||||||
|
"flakes"
|
||||||
|
];
|
||||||
max-jobs = "auto"; # Use all CPU cores
|
max-jobs = "auto"; # Use all CPU cores
|
||||||
cores = 0; # Use all cores per build
|
cores = 0; # Use all cores per build
|
||||||
# disabled due to https://github.com/NixOS/nix/issues/7273
|
# disabled due to https://github.com/NixOS/nix/issues/7273
|
||||||
# auto-optimise-store = true;
|
# auto-optimise-store = true;
|
||||||
substituters =
|
substituters = [
|
||||||
[ "https://cache.nixos.org" "https://nix-community.cachix.org" ];
|
"https://cache.nixos.org"
|
||||||
|
"https://nix-community.cachix.org"
|
||||||
|
];
|
||||||
trusted-public-keys = [
|
trusted-public-keys = [
|
||||||
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
||||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||||
@@ -21,7 +41,9 @@
|
|||||||
# Garbage collection
|
# Garbage collection
|
||||||
gc = {
|
gc = {
|
||||||
automatic = true;
|
automatic = true;
|
||||||
interval = { Weekday = 7; }; # Run weekly
|
interval = {
|
||||||
|
Weekday = 7;
|
||||||
|
}; # Run weekly
|
||||||
options = "--delete-older-than 30d";
|
options = "--delete-older-than 30d";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -34,7 +56,9 @@
|
|||||||
info.enable = false; # Skip info pages
|
info.enable = false; # Skip info pages
|
||||||
};
|
};
|
||||||
|
|
||||||
nixpkgs.config = { allowUnfree = true; };
|
nixpkgs.config = {
|
||||||
|
allowUnfree = true;
|
||||||
|
};
|
||||||
# homebrew installation manager
|
# homebrew installation manager
|
||||||
nix-homebrew = {
|
nix-homebrew = {
|
||||||
user = primaryUser;
|
user = primaryUser;
|
||||||
|
|||||||
9
darwin/fonts.nix
Normal file
9
darwin/fonts.nix
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
# TODO: Duplicate file
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
fonts.packages = with pkgs; [
|
||||||
|
nerd-fonts.fira-code
|
||||||
|
nerd-fonts.fira-mono
|
||||||
|
nerd-fonts.hack
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
# homebrew is best for GUI apps
|
# homebrew is best for GUI apps
|
||||||
# nixpkgs is best for CLI tools
|
# nixpkgs is best for CLI tools
|
||||||
casks = [ "element" "affinity" "onlyoffice" "tailscale" ];
|
casks = [ "element" "affinity" "onlyoffice" ];
|
||||||
brews = [ ];
|
brews = [ ];
|
||||||
taps = [ ];
|
taps = [ ];
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
{ self, ... }: {
|
{ self, ... }:
|
||||||
|
{
|
||||||
# touch ID for sudo
|
# touch ID for sudo
|
||||||
security.pam.services.sudo_local.touchIdAuth = true;
|
security.pam.services.sudo_local.touchIdAuth = true;
|
||||||
|
|
||||||
|
|||||||
@@ -29,6 +29,8 @@
|
|||||||
];
|
];
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
|
#targets.darwin.copyApps.enableChecks = isDarwin;
|
||||||
|
|
||||||
catppuccin = {
|
catppuccin = {
|
||||||
enable = false;
|
enable = false;
|
||||||
accent = "sky";
|
accent = "sky";
|
||||||
@@ -86,6 +88,8 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
home = {
|
home = {
|
||||||
|
|
||||||
|
# activation.checkAppManagementPermission = lib.mkForce "";
|
||||||
username = primaryUser;
|
username = primaryUser;
|
||||||
stateVersion = "26.05";
|
stateVersion = "26.05";
|
||||||
sessionVariables = lib.mkIf (!isDarwin) {
|
sessionVariables = lib.mkIf (!isDarwin) {
|
||||||
|
|||||||
@@ -4,10 +4,10 @@
|
|||||||
"type": "kitty-icat",
|
"type": "kitty-icat",
|
||||||
"source": "~/Pictures/Avatar/avatar_no_bg.png",
|
"source": "~/Pictures/Avatar/avatar_no_bg.png",
|
||||||
// "height": 15,
|
// "height": 15,
|
||||||
"width": 32,
|
"width": 28,
|
||||||
"padding": {
|
"padding": {
|
||||||
"top": 2,
|
"top": 0,
|
||||||
"left": 0
|
"left": 0,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"modules": [
|
"modules": [
|
||||||
|
|||||||
138
home/shell.nix
138
home/shell.nix
@@ -1,4 +1,10 @@
|
|||||||
{ pkgs, isDarwin, lib, ... }: {
|
{
|
||||||
|
pkgs,
|
||||||
|
isDarwin,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
eza # ls replacement
|
eza # ls replacement
|
||||||
tdf # terminal pdf viewer
|
tdf # terminal pdf viewer
|
||||||
@@ -40,31 +46,32 @@
|
|||||||
tab_bar_min_tabs = 1;
|
tab_bar_min_tabs = 1;
|
||||||
tab_bar_edge = "bottom";
|
tab_bar_edge = "bottom";
|
||||||
tab_bar_style = "custom"; # Should be changed to custom
|
tab_bar_style = "custom"; # Should be changed to custom
|
||||||
tab_title_template =
|
tab_title_template = "{fmt.fg.red}{bell_symbol}{activity_symbol}{fmt.fg.tab}{title}";
|
||||||
"{fmt.fg.red}{bell_symbol}{activity_symbol}{fmt.fg.tab}{title}";
|
|
||||||
|
|
||||||
symbol_map = let
|
symbol_map =
|
||||||
mappings = [
|
let
|
||||||
"U+23FB-U+23FE"
|
mappings = [
|
||||||
"U+2B58"
|
"U+23FB-U+23FE"
|
||||||
"U+E200-U+E2A9"
|
"U+2B58"
|
||||||
"U+E0A0-U+E0A3"
|
"U+E200-U+E2A9"
|
||||||
"U+E0B0-U+E0BF"
|
"U+E0A0-U+E0A3"
|
||||||
"U+E0C0-U+E0C8"
|
"U+E0B0-U+E0BF"
|
||||||
"U+E0CC-U+E0CF"
|
"U+E0C0-U+E0C8"
|
||||||
"U+E0D0-U+E0D2"
|
"U+E0CC-U+E0CF"
|
||||||
"U+E0D4"
|
"U+E0D0-U+E0D2"
|
||||||
"U+E700-U+E7C5"
|
"U+E0D4"
|
||||||
"U+F000-U+F2E0"
|
"U+E700-U+E7C5"
|
||||||
"U+2665"
|
"U+F000-U+F2E0"
|
||||||
"U+26A1"
|
"U+2665"
|
||||||
"U+F400-U+F4A8"
|
"U+26A1"
|
||||||
"U+F67C"
|
"U+F400-U+F4A8"
|
||||||
"U+E000-U+E00A"
|
"U+F67C"
|
||||||
"U+F300-U+F313"
|
"U+E000-U+E00A"
|
||||||
"U+E5FA-U+E62B"
|
"U+F300-U+F313"
|
||||||
];
|
"U+E5FA-U+E62B"
|
||||||
in (builtins.concatStringsSep "," mappings) + " Symbols Nerd Font Mono";
|
];
|
||||||
|
in
|
||||||
|
(builtins.concatStringsSep "," mappings) + " Symbols Nerd Font Mono";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -75,15 +82,24 @@
|
|||||||
urls = [
|
urls = [
|
||||||
{
|
{
|
||||||
url = "https://www.tagesschau.de/xml/rss2";
|
url = "https://www.tagesschau.de/xml/rss2";
|
||||||
tags = [ "news" "de" ];
|
tags = [
|
||||||
|
"news"
|
||||||
|
"de"
|
||||||
|
];
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
url = "https://www.spiegel.de/schlagzeilen/index.rss";
|
url = "https://www.spiegel.de/schlagzeilen/index.rss";
|
||||||
tags = [ "news" "de" ];
|
tags = [
|
||||||
|
"news"
|
||||||
|
"de"
|
||||||
|
];
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
url = "https://www.focus.de/rss";
|
url = "https://www.focus.de/rss";
|
||||||
tags = [ "news" "de" ];
|
tags = [
|
||||||
|
"news"
|
||||||
|
"de"
|
||||||
|
];
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
url = "https://feeds.feedburner.com/blogspot/rkEL";
|
url = "https://feeds.feedburner.com/blogspot/rkEL";
|
||||||
@@ -100,7 +116,13 @@
|
|||||||
enableZshIntegration = true;
|
enableZshIntegration = true;
|
||||||
enableFishIntegration = true;
|
enableFishIntegration = true;
|
||||||
|
|
||||||
settings = { ration = [ 1 3 4 ]; };
|
settings = {
|
||||||
|
ration = [
|
||||||
|
1
|
||||||
|
3
|
||||||
|
4
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.fzf = {
|
programs.fzf = {
|
||||||
@@ -109,8 +131,7 @@
|
|||||||
enableZshIntegration = true;
|
enableZshIntegration = true;
|
||||||
enableFishIntegration = true;
|
enableFishIntegration = true;
|
||||||
defaultCommand = "fd --type f --strip-cwd-prefix --hidden --exclude .git";
|
defaultCommand = "fd --type f --strip-cwd-prefix --hidden --exclude .git";
|
||||||
fileWidgetCommand =
|
fileWidgetCommand = "fd --type f --strip-cwd-prefix --hidden --exclude .git";
|
||||||
"fd --type f --strip-cwd-prefix --hidden --exclude .git";
|
|
||||||
defaultOptions = [
|
defaultOptions = [
|
||||||
"--height 100%"
|
"--height 100%"
|
||||||
"--border sharp"
|
"--border sharp"
|
||||||
@@ -171,32 +192,56 @@
|
|||||||
cat = "bat --color=always --style=numbers";
|
cat = "bat --color=always --style=numbers";
|
||||||
grep = "rg";
|
grep = "rg";
|
||||||
cp = "rsync -ah --progress";
|
cp = "rsync -ah --progress";
|
||||||
nix-switch = if isDarwin then
|
nix-switch =
|
||||||
"sudo darwin-rebuild switch --flake ~/.config/nix#(hostname -s)"
|
if isDarwin then
|
||||||
else
|
"sudo darwin-rebuild switch --flake ~/.config/nix#(hostname -s)"
|
||||||
"sudo nixos-rebuild switch --flake ~/.config/nix#(hostname -s)";
|
else
|
||||||
|
"sudo nixos-rebuild switch --flake ~/.config/nix#(hostname -s)";
|
||||||
|
|
||||||
nix-check = if isDarwin then
|
nix-check =
|
||||||
"nix eval ~/.config/nix#darwinConfigurations.(hostname -s).config.system.build.toplevel.outPath"
|
if isDarwin then
|
||||||
else
|
"nix eval ~/.config/nix#darwinConfigurations.(hostname -s).config.system.build.toplevel.outPath"
|
||||||
"nix flake check --no-build ~/.config/nix";
|
else
|
||||||
|
"nix flake check --no-build ~/.config/nix";
|
||||||
};
|
};
|
||||||
|
|
||||||
interactiveShellInit = ''
|
interactiveShellInit = ''
|
||||||
starship init fish | source
|
starship init fish | source
|
||||||
fzf --fish | source
|
fzf --fish | source
|
||||||
function fish_greeting
|
zoxide init fish --cmd cd | source
|
||||||
fastfetch
|
function fish_greeting
|
||||||
end
|
fastfetch
|
||||||
|
end
|
||||||
'';
|
'';
|
||||||
|
|
||||||
functions.l = {
|
functions.l = {
|
||||||
body = ''
|
body = ''
|
||||||
llm prompt -m groq/llama-3.3-70b-versatile -t std $argv | glow
|
if test -f "$GROQ_API_KEY"
|
||||||
|
set -x GROQ_API_KEY (cat $GROQ_API_KEY)
|
||||||
|
end
|
||||||
|
llm prompt -m groq/llama-3.3-70b-versatile -t std $argv | glow
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Link LLM std template
|
||||||
|
home.file.".config/io.datasette.llm/templates/std.yaml".text = ''
|
||||||
|
system: |
|
||||||
|
You are a concise technical assistant running on an Intel Mac (x86_64-darwin)
|
||||||
|
with nix-darwin and home-manager.
|
||||||
|
|
||||||
|
Rules:
|
||||||
|
- Always respond in valid markdown
|
||||||
|
- Be concise and direct, no unnecessary explanation
|
||||||
|
- Prefer code blocks for commands and code
|
||||||
|
- You have access to these tools in the shell: nvim, fish, git,
|
||||||
|
eza, bat, ripgrep, fzf, yazi, glow, llm, zoxide, fastfetch,
|
||||||
|
nix, darwin-rebuild, brew
|
||||||
|
- When suggesting nix config changes, use the nix language
|
||||||
|
- nix-switch rebuilds the system config
|
||||||
|
- nix-check validates the flake without building
|
||||||
|
'';
|
||||||
|
|
||||||
programs.starship = {
|
programs.starship = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
@@ -235,8 +280,7 @@
|
|||||||
|
|
||||||
# Git status module settings
|
# Git status module settings
|
||||||
git_status = {
|
git_status = {
|
||||||
format =
|
format = "[[(*$conflicted$untracked$modified$staged$renamed$deleted)](red) ($ahead_behind$stashed)]($style)";
|
||||||
"[[(*$conflicted$untracked$modified$staged$renamed$deleted)](red) ($ahead_behind$stashed)]($style)";
|
|
||||||
style = "bold #a6e3a1";
|
style = "bold #a6e3a1";
|
||||||
conflicted = "";
|
conflicted = "";
|
||||||
untracked = "";
|
untracked = "";
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
# TODO: Duplicate file
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
fonts.packages = with pkgs; [
|
fonts.packages = with pkgs; [
|
||||||
|
|||||||
Reference in New Issue
Block a user