Added: yabai, skhd, openscad-nvim, some programs, sketchybar; WIP: Sketchybar, needs widgets

This commit is contained in:
2025-12-29 23:56:45 +01:00
parent 4421aa7335
commit de5c0feaa3
13 changed files with 272 additions and 122 deletions

View File

@@ -1,7 +1,8 @@
{ pkgs, inputs, self, primaryUser, ... }: {
imports = [
# ./homebrew.nix
./homebrew.nix
./settings.nix
./yabai.nix
inputs.home-manager.darwinModules.home-manager
inputs.nix-homebrew.darwinModules.nix-homebrew
];
@@ -16,7 +17,7 @@
enable = false; # using determinate installer
};
nixpkgs.config.allowUnfree = true;
nixpkgs.config = { allowUnfree = true; };
# homebrew installation manager
nix-homebrew = {
user = primaryUser;

View File

@@ -1,5 +1,4 @@
{ ... }:
{
{ ... }: {
homebrew = {
enable = true;
@@ -15,40 +14,10 @@
# homebrew is best for GUI apps
# nixpkgs is best for CLI tools
casks = [
# OS enhancements
"aerospace"
"cleanshot"
"hiddenbar"
"raycast"
"betterdisplay"
"element"
# dev
"cursor"
"ghostty"
"visual-studio-code"
"zed"
# messaging
"discord"
"slack"
"signal"
# other
"1password"
"anki"
"brave-browser"
"obsidian"
"protonvpn"
"spotify"
"thebrowsercompany-dia"
"zen"
];
brews = [
"docker"
"colima"
];
taps = [
"nikitabobko/tap"
];
brews = [ ];
taps = [ ];
};
}

View File

@@ -42,7 +42,10 @@
{ app = "/Users/phil/Applications/Home Manager Apps/Spotify.app"; }
{ app = "/Users/phil/Applications/Home Manager Apps/Floorp.app"; }
{ app = "/Users/phil/Applications/Home Manager Apps/Obsidian.app"; }
{ app = "/Applications/Launchpad.app"; } # Doenst Work?
{ app = "/Users/phil/Applications/Home Manager Apps/OpenSCAD.app"; }
{ app = "/Applications/okular.app"; }
{ app = "/System/Applications/Mail.app"; }
{ app = "/System/Applications/Launchpad.app"; }
];
show-recents = false;
mineffect = "genie";

105
darwin/yabai.nix Normal file
View File

@@ -0,0 +1,105 @@
{ pkgs, ... }: {
services = {
yabai = {
enable = true;
config = {
external_bar = "main:40:0";
menubar_opacity = 1.0;
mouse_follows_focus = "on";
focus_follows_mouse = "on";
display_arrangement_order = "default";
window_origin_display = "default";
window_placement = "second_child";
window_insertion_point = "focused";
window_zoom_persist = "on";
window_shadow = "off";
window_animation_duration = 0.0;
window_animation_easing = "ease_out_circ";
window_opacity_duration = 0.0;
active_window_opacity = 1.0;
normal_window_opacity = 0.9;
window_opacity = "off";
insert_feedback_color = "0xffd75f5f";
split_ratio = 0.5;
split_type = "auto";
auto_balance = "off";
top_padding = 2;
bottom_padding = 2;
left_padding = 2;
right_padding = 2;
window_gap = 2;
layout = "bsp";
mouse_modifier = "fn";
mouse_action1 = "move";
mouse_action2 = "resize";
mouse_drop_action = "swap";
};
};
skhd = {
enable = true;
skhdConfig = ''
# Application Bindings
cmd - q : open -a kitty
cmd - e : ${pkgs.kitty}/bin/kitty yazi
cmd - o : open -a "Obsidian"
cmd - i : open -a "Floorp"
cmd - g : open -a "Mail"
# Window Management (using yabai if installed, otherwise basic macOS)
cmd + shift - c : yabai -m window --close || osascript -e 'tell application "System Events" to keystroke "w" using command down'
cmd + shift - v : yabai -m window --toggle float
# Focus windows (vim-like)
cmd - left : yabai -m window --focus west
cmd - right : yabai -m window --focus east
cmd - up : yabai -m window --focus north
cmd - down : yabai -m window --focus south
# Move windows to spaces (workspaces)
cmd + shift - 1 : yabai -m window --space 1
cmd + shift - 2 : yabai -m window --space 2
cmd + shift - 3 : yabai -m window --space 3
cmd + shift - 4 : yabai -m window --space 4
cmd + shift - 5 : yabai -m window --space 5
cmd + shift - 6 : yabai -m window --space 6
cmd + shift - 7 : yabai -m window --space 7
cmd + shift - 8 : yabai -m window --space 8
cmd + shift - 9 : yabai -m window --space 9
cmd + shift - 0 : yabai -m window --space 10
# Switch to spaces (workspaces)
cmd - 1 : yabai -m space --focus 1
cmd - 2 : yabai -m space --focus 2
cmd - 3 : yabai -m space --focus 3
cmd - 4 : yabai -m space --focus 4
cmd - 5 : yabai -m space --focus 5
cmd - 6 : yabai -m space --focus 6
cmd - 7 : yabai -m space --focus 7
cmd - 8 : yabai -m space --focus 8
cmd - 9 : yabai -m space --focus 9
cmd - 0 : yabai -m space --focus 10
# Screenshot (macOS native)
cmd - z : screencapture -i ~/Pictures/Screenshots/$(date +%s).png
cmd - u : screencapture ~/Pictures/Screenshots/$(date +%s).png
# Launcher (using Raycast or Spotlight as Rofi alternative)
cmd - r : open -a "Raycast" || osascript -e 'tell application "System Events" to keystroke space using command down'
# Lock screen
cmd - m : pmset displaysleepnow
# Toggle layout (if using yabai)
cmd - j : yabai -m space --layout $(yabai -m query --spaces --space | jq -r 'if .type == "bsp" then "float" else "bsp" end')
cmd - p : yabai -m window --toggle split
# Reload skhd config
cmd + shift - r : skhd --reload
'';
};
};
}

View File

@@ -1,5 +1,13 @@
{
description = "Nix Darwin Configuration";
nixConfig = {
extra-substituters = [ "https://nix-community.cachix.org" ];
extra-trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
};
inputs = {
# monorepo w/ recipes ("derivations")
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";

View File

@@ -16,6 +16,8 @@
./floorp.nix
./obsidian.nix
./desktop
];
home = {

2
home/desktop/default.nix Normal file
View File

@@ -0,0 +1,2 @@
{ ... }: { imports = [ ./sketchybar.nix ]; }

View File

@@ -0,0 +1,6 @@
_: {
programs.sketchybar = {
enable = true;
};
}

View File

@@ -1,97 +1,106 @@
{ pkgs, ... }: {
# Avante: AI-powered coding assistant (Cursor-like experience in Neovim)
programs.nixvim = {
#extraConfigLuaPre = ''
# vim.env.GROQ_API_KEY = os.getenv("GROQ_API_KEY")
#'';
# TODO: Integrate CoPilot https://github.com/settings/copilot/features
plugins.avante = {
enable = true;
autoLoad = true;
settings = {
provider = "groq";
providers.groq = {
__inherited_from = "openai";
api_key_name = "GROQ_API_KEY";
endpoint = "https://api.groq.com/openai/v1/";
model = "groq/compound-mini";
disable_tools = true;
extra_request_body = {
temperature = 1;
max_tokens = 8192;
plugins = {
markdown-preview.enable = true;
render-markdown.enable = true;
#extraConfigLuaPre = ''
# vim.env.GROQ_API_KEY = os.getenv("GROQ_API_KEY")
#'';
# TODO: Integrate CoPilot https://github.com/settings/copilot/features
avante = {
enable = true;
autoLoad = true;
settings = {
provider = "groq";
providers.groq = {
__inherited_from = "openai";
api_key_name = "GROQ_API_KEY";
endpoint = "https://api.groq.com/openai/v1/";
model = "groq/compound-mini";
disable_tools = true;
extra_request_body = {
temperature = 1;
max_tokens = 8192;
tools = null;
tool_choice = "none";
};
};
};
# auto_suggestions_provider = "copilot";
# auto_suggestions_provider = "copilot";
behaviour = {
auto_suggestions = false;
auto_set_highlight_group = true;
auto_set_keymaps = true;
auto_apply_diff_after_generation = false;
support_paste_from_clipboard = false;
};
render = { markdown = true; };
behaviour = {
auto_suggestions = false;
auto_set_highlight_group = true;
auto_set_keymaps = true;
auto_apply_diff_after_generation = false;
support_paste_from_clipboard = false;
};
mappings = {
ask = "<leader>aa";
edit = "<leader>ae";
refresh = "<leader>ar";
diff = {
ours = "co";
theirs = "ct";
all_theirs = "ca";
both = "cb";
cursor = "cc";
next = "]x";
prev = "[x";
};
suggestion = {
accept = "<M-l>";
next = "<M-]>";
prev = "<M-[>";
dismiss = "<C-]>";
};
jump = {
next = "]]";
prev = "[[";
};
submit = {
normal = "<CR>";
insert = "<C-s>";
};
sidebar = {
switch_windows = "<Tab>";
reverse_switch_windows = "<S-Tab>";
};
};
hints = { enabled = true; };
windows = {
position = "right";
wrap = true;
width = 30;
sidebar_header = {
align = "center";
rounded = true;
};
};
highlights = {
diff = {
current = "DiffText";
incoming = "DiffAdd";
};
};
mappings = {
ask = "<leader>aa";
edit = "<leader>ae";
refresh = "<leader>ar";
diff = {
ours = "co";
theirs = "ct";
all_theirs = "ca";
both = "cb";
cursor = "cc";
next = "]x";
prev = "[x";
autojump = true;
list_opener = "copen";
};
suggestion = {
accept = "<M-l>";
next = "<M-]>";
prev = "<M-[>";
dismiss = "<C-]>";
};
jump = {
next = "]]";
prev = "[[";
};
submit = {
normal = "<CR>";
insert = "<C-s>";
};
sidebar = {
switch_windows = "<Tab>";
reverse_switch_windows = "<S-Tab>";
};
};
hints = { enabled = true; };
windows = {
position = "right";
wrap = true;
width = 30;
sidebar_header = {
align = "center";
rounded = true;
};
};
highlights = {
diff = {
current = "DiffText";
incoming = "DiffAdd";
};
};
diff = {
autojump = true;
list_opener = "copen";
};
};
};
extraPackages = with pkgs; [ curl ];
extraPackages = with pkgs; [ curl ];
};
};
}

View File

@@ -11,6 +11,7 @@
./catppuccin.nix
./alpha.nix
./avante.nix
./openscad.nix
];
programs.nixvim = {

28
home/neovim/openscad.nix Normal file
View File

@@ -0,0 +1,28 @@
{ pkgs, ... }: {
# OpenSCAD: 3D modeling language support with syntax highlighting,
# cheatsheet, snippets, offline manual and fuzzy help
programs.nixvim = {
plugins.openscad = {
enable = true;
autoLoad = true;
settings = {
fuzzy_finder = "fzf";
auto_open = true;
cheatsheet_toggle_key = "<leader>os";
default_mappings = true;
exec_openscad_trig_key = "<leader>oo";
help_manual_trig_key = "<leader>om";
help_trig_key = "<leader>oh";
top_toggle = "<leader>oc";
};
};
# Install OpenSCAD binary for preview/compilation
extraPackages = with pkgs; [
openscad
zathura # PDF viewer for manual
fzf
];
};
}

View File

@@ -14,6 +14,20 @@
# programming languages
#mise # node, deno, bun, rust, python, etc.
# GUI
openscad
# element-desktop
# zapzap
# audacity
blender
fstl
# sqlitebrowser
# PDF Tools
pandoc
texlive.combined.scheme-full
wkhtmltopdf
# misc
nil # move to nixvim
biome # move to nixvim

View File

@@ -83,7 +83,8 @@
la = "eza -la";
f = "fzf";
i = "kitty +kitten icat";
"nix-switch" = "sudo darwin-rebuild switch --flake ~/.config/nix";
"nix-switch" =
"sudo darwin-rebuild switch --flake ~/.config/nix#cyper-mac";
};
initContent = "fastfetch";
@@ -97,7 +98,8 @@
la = "eza -la";
f = "fzf";
i = "kitty +kitten icat";
"nix-switch" = "sudo darwin-rebuild switch --flake ~/.config/nix";
"nix-switch" =
"sudo darwin-rebuild switch --flake ~/.config/nix#cyper-mac";
};
interactiveShellInit = ''