Added: yabai, skhd, openscad-nvim, some programs, sketchybar; WIP: Sketchybar, needs widgets
This commit is contained in:
@@ -1,7 +1,8 @@
|
|||||||
{ pkgs, inputs, self, primaryUser, ... }: {
|
{ pkgs, inputs, self, primaryUser, ... }: {
|
||||||
imports = [
|
imports = [
|
||||||
# ./homebrew.nix
|
./homebrew.nix
|
||||||
./settings.nix
|
./settings.nix
|
||||||
|
./yabai.nix
|
||||||
inputs.home-manager.darwinModules.home-manager
|
inputs.home-manager.darwinModules.home-manager
|
||||||
inputs.nix-homebrew.darwinModules.nix-homebrew
|
inputs.nix-homebrew.darwinModules.nix-homebrew
|
||||||
];
|
];
|
||||||
@@ -16,7 +17,7 @@
|
|||||||
enable = false; # using determinate installer
|
enable = false; # using determinate installer
|
||||||
};
|
};
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config = { allowUnfree = true; };
|
||||||
# homebrew installation manager
|
# homebrew installation manager
|
||||||
nix-homebrew = {
|
nix-homebrew = {
|
||||||
user = primaryUser;
|
user = primaryUser;
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
{ ... }:
|
{ ... }: {
|
||||||
{
|
|
||||||
homebrew = {
|
homebrew = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
@@ -15,40 +14,10 @@
|
|||||||
# 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 = [
|
casks = [
|
||||||
# OS enhancements
|
"element"
|
||||||
"aerospace"
|
|
||||||
"cleanshot"
|
|
||||||
"hiddenbar"
|
|
||||||
"raycast"
|
|
||||||
"betterdisplay"
|
|
||||||
|
|
||||||
# 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 = [ ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,7 +42,10 @@
|
|||||||
{ app = "/Users/phil/Applications/Home Manager Apps/Spotify.app"; }
|
{ 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/Floorp.app"; }
|
||||||
{ app = "/Users/phil/Applications/Home Manager Apps/Obsidian.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;
|
show-recents = false;
|
||||||
mineffect = "genie";
|
mineffect = "genie";
|
||||||
|
|||||||
105
darwin/yabai.nix
Normal file
105
darwin/yabai.nix
Normal 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
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,5 +1,13 @@
|
|||||||
{
|
{
|
||||||
description = "Nix Darwin Configuration";
|
description = "Nix Darwin Configuration";
|
||||||
|
|
||||||
|
nixConfig = {
|
||||||
|
extra-substituters = [ "https://nix-community.cachix.org" ];
|
||||||
|
extra-trusted-public-keys = [
|
||||||
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
# monorepo w/ recipes ("derivations")
|
# monorepo w/ recipes ("derivations")
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
||||||
|
|||||||
@@ -16,6 +16,8 @@
|
|||||||
|
|
||||||
./floorp.nix
|
./floorp.nix
|
||||||
./obsidian.nix
|
./obsidian.nix
|
||||||
|
|
||||||
|
./desktop
|
||||||
];
|
];
|
||||||
|
|
||||||
home = {
|
home = {
|
||||||
|
|||||||
2
home/desktop/default.nix
Normal file
2
home/desktop/default.nix
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
{ ... }: { imports = [ ./sketchybar.nix ]; }
|
||||||
|
|
||||||
6
home/desktop/sketchybar.nix
Normal file
6
home/desktop/sketchybar.nix
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
_: {
|
||||||
|
programs.sketchybar = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,11 +1,15 @@
|
|||||||
{ pkgs, ... }: {
|
{ pkgs, ... }: {
|
||||||
# Avante: AI-powered coding assistant (Cursor-like experience in Neovim)
|
# Avante: AI-powered coding assistant (Cursor-like experience in Neovim)
|
||||||
programs.nixvim = {
|
programs.nixvim = {
|
||||||
|
|
||||||
|
plugins = {
|
||||||
|
markdown-preview.enable = true;
|
||||||
|
render-markdown.enable = true;
|
||||||
#extraConfigLuaPre = ''
|
#extraConfigLuaPre = ''
|
||||||
# vim.env.GROQ_API_KEY = os.getenv("GROQ_API_KEY")
|
# vim.env.GROQ_API_KEY = os.getenv("GROQ_API_KEY")
|
||||||
#'';
|
#'';
|
||||||
# TODO: Integrate CoPilot https://github.com/settings/copilot/features
|
# TODO: Integrate CoPilot https://github.com/settings/copilot/features
|
||||||
plugins.avante = {
|
avante = {
|
||||||
enable = true;
|
enable = true;
|
||||||
autoLoad = true;
|
autoLoad = true;
|
||||||
settings = {
|
settings = {
|
||||||
@@ -20,11 +24,15 @@
|
|||||||
extra_request_body = {
|
extra_request_body = {
|
||||||
temperature = 1;
|
temperature = 1;
|
||||||
max_tokens = 8192;
|
max_tokens = 8192;
|
||||||
|
tools = null;
|
||||||
|
tool_choice = "none";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# auto_suggestions_provider = "copilot";
|
# auto_suggestions_provider = "copilot";
|
||||||
|
|
||||||
|
render = { markdown = true; };
|
||||||
|
|
||||||
behaviour = {
|
behaviour = {
|
||||||
auto_suggestions = false;
|
auto_suggestions = false;
|
||||||
auto_set_highlight_group = true;
|
auto_set_highlight_group = true;
|
||||||
@@ -94,4 +102,5 @@
|
|||||||
|
|
||||||
extraPackages = with pkgs; [ curl ];
|
extraPackages = with pkgs; [ curl ];
|
||||||
};
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
./catppuccin.nix
|
./catppuccin.nix
|
||||||
./alpha.nix
|
./alpha.nix
|
||||||
./avante.nix
|
./avante.nix
|
||||||
|
./openscad.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.nixvim = {
|
programs.nixvim = {
|
||||||
|
|||||||
28
home/neovim/openscad.nix
Normal file
28
home/neovim/openscad.nix
Normal 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
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -14,6 +14,20 @@
|
|||||||
# programming languages
|
# programming languages
|
||||||
#mise # node, deno, bun, rust, python, etc.
|
#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
|
# misc
|
||||||
nil # move to nixvim
|
nil # move to nixvim
|
||||||
biome # move to nixvim
|
biome # move to nixvim
|
||||||
|
|||||||
@@ -83,7 +83,8 @@
|
|||||||
la = "eza -la";
|
la = "eza -la";
|
||||||
f = "fzf";
|
f = "fzf";
|
||||||
i = "kitty +kitten icat";
|
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";
|
initContent = "fastfetch";
|
||||||
@@ -97,7 +98,8 @@
|
|||||||
la = "eza -la";
|
la = "eza -la";
|
||||||
f = "fzf";
|
f = "fzf";
|
||||||
i = "kitty +kitten icat";
|
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 = ''
|
interactiveShellInit = ''
|
||||||
|
|||||||
Reference in New Issue
Block a user