darwin pkgs support sucks fr

This commit is contained in:
Kulvir Singh
2025-01-10 22:47:01 +05:30
parent f3417e1987
commit d54160c4db
13 changed files with 198 additions and 24 deletions

115
modules/alacritty.nix Normal file
View File

@@ -0,0 +1,115 @@
{...}: {
programs.alacritty = {
enable = true;
settings = {
env = {
TERM = "xterm-256color";
};
cursor = {
style = "Beam";
};
font = {
normal.family = "JetBrainsMono Nerd Font";
bold.family = "JetBrainsMono Nerd Font";
italic.family = "JetBrainsMono Nerd Font";
bold_italic.family = "JetBrainsMono Nerd Font";
size = 16;
};
mouse.hide_when_typing = true;
selection.save_to_clipboard = true;
window = {
decorations = "none";
opacity = 0.95;
padding = {
x = 2;
y = 2;
};
};
# ROSE-PINE theme
colors = {
primary = {
foreground = "#e0def4";
background = "#191724";
dim_foreground = "#908caa";
bright_foreground = "#e0def4";
};
cursor = {
text = "#e0def4";
cursor = "#524f67";
};
vi_mode_cursor = {
text = "#e0def4";
cursor = "#524f67";
};
search = {
matches = {
foreground = "#908caa";
background = "#26233a";
};
focused_match = {
foreground = "#191724";
background = "#ebbcba";
};
};
hints = {
start = {
foreground = "#908caa";
background = "#1f1d2e";
};
end = {
foreground = "#6e6a86";
background = "#1f1d2e";
};
};
line_indicator = {
foreground = "None";
background = "None";
};
footer_bar = {
foreground = "#e0def4";
background = "#1f1d2e";
};
selection = {
text = "#e0def4";
background = "#403d52";
};
normal = {
black = "#26233a";
red = "#eb6f92";
green = "#31748f";
yellow = "#f6c177";
blue = "#9ccfd8";
magenta = "#c4a7e7";
cyan = "#ebbcba";
white = "#e0def4";
};
bright = {
black = "#6e6a86";
red = "#eb6f92";
green = "#31748f";
yellow = "#f6c177";
blue = "#9ccfd8";
magenta = "#c4a7e7";
cyan = "#ebbcba";
white = "#e0def4";
};
dim = {
black = "#6e6a86";
red = "#eb6f92";
green = "#31748f";
yellow = "#f6c177";
blue = "#9ccfd8";
magenta = "#c4a7e7";
cyan = "#ebbcba";
white = "#e0def4";
};
};
};
};
}

115
modules/fastfetch.nix Normal file
View File

@@ -0,0 +1,115 @@
{...}: {
programs.fastfetch = {
enable = true;
settings = {
logo = {
padding = {
top = 2;
};
};
display = {
separator = " ";
};
modules = [
"break"
"break"
"break"
{
type = "os";
key = "OS ";
keyColor = "red";
}
{
type = "kernel";
key = " ";
keyColor = "red";
}
{
type = "shell";
key = " ";
keyColor = "red";
}
"break"
{
type = "wm";
key = "WM ";
keyColor = "green";
}
{
type = "wmtheme";
key = " 󰉼 ";
keyColor = "green";
}
{
type = "icons";
key = " 󰀻 ";
keyColor = "green";
}
{
type = "cursor";
key = " ";
keyColor = "green";
}
{
type = "terminal";
key = " ";
keyColor = "green";
}
{
type = "terminalfont";
key = " ";
keyColor = "green";
}
"break"
{
type = "host";
format = "{5} {1} Type {2}";
key = "PC ";
keyColor = "yellow";
}
{
type = "cpu";
format = "{1} ({3}) @ {7} GHz";
key = " ";
keyColor = "yellow";
}
{
type = "gpu";
format = "{1} {2} @ {12} GHz";
key = " 󰢮 ";
keyColor = "yellow";
}
{
type = "uptime";
key = " ";
keyColor = "yellow";
}
{
type = "memory";
key = " ";
keyColor = "yellow";
}
{
type = "swap";
key = " 󰓡 ";
keyColor = "yellow";
}
{
type = "disk";
key = " 󰋊 ";
keyColor = "yellow";
}
{
type = "monitor";
key = " ";
keyColor = "yellow";
}
"break"
"break"
];
};
};
}

30
modules/git.nix Normal file
View File

@@ -0,0 +1,30 @@
{
username,
email,
...
}: {
programs.git = {
enable = true;
userName = "Kulvir Singh";
userEmail = "kulvirs734@gmail.com";
aliases = {
cm = "commit -m";
amend = "commit --amend";
};
ignores = [
".DS_Store"
".env"
];
lfs.enable = true; # make ptr to large files(audio/video) locally
extraConfig = {
init.defaultBranch = "trunk";
credential.helper = "cache";
push.autoSetupRemote = true;
};
};
}

56
modules/kitty.nix Normal file
View File

@@ -0,0 +1,56 @@
{...}: {
programs.kitty = {
enable = true;
font = {
name = "JetBrainsMono Nerd Font";
size = 14.0;
};
keybindings = {
"kitty_mod+enter" = "no_op";
"cmd+enter" = "no_op";
"cmd+t" = "new_tab_with_cwd";
"cmd+1" = "goto_tab 1";
"cmd+2" = "goto_tab 2";
"cmd+3" = "goto_tab 3";
"cmd+4" = "goto_tab 4";
"cmd+5" = "goto_tab 5";
"cmd+6" = "goto_tab 6";
"cmd+7" = "goto_tab 7";
"cmd+8" = "goto_tab 8";
"cmd+9" = "goto_tab 9";
};
shellIntegration.enableZshIntegration = true;
themeFile = "Catppuccin-Mocha";
extraConfig = ''
cursor_shape beam
background_opacity 0.95
background_blur 12
macos_quit_when_last_window_closed yes
macos_show_window_title_in none
enable_audio_bell no
hide_window_decorations yes
# tab bar at bottom stlying
tab_bar_style powerline
tab_bar_min_tabs 2
tab_title_template "{index}"
active_tab_title_template "{index}"
tab_bar_background none
# macOS - CMD/Option navs
map cmd+backspace send_text all \x15
map alt+backspace send_text all \x17
map cmd+left send_text all \x01
map cmd+right send_text all \x05
'';
};
}

16
modules/nvim.nix Normal file
View File

@@ -0,0 +1,16 @@
{pkgs, ...}: {
home.file = {
".config/nvim" = {
recursive = true;
source = "${pkgs.lilj-nvim-config}";
};
};
programs = {
neovim = {
enable = true;
defaultEditor = true;
vimAlias = true;
};
};
}

45
modules/shell.nix Normal file
View File

@@ -0,0 +1,45 @@
{pkgs, ...}: {
programs = {
zsh = {
enable = true;
shellAliases = {
ls = "lsd";
neofetch = "fastfetch";
nv = "nvim";
python = "python3";
};
syntaxHighlighting.enable = true;
};
btop = {
enable = true;
settings = {
theme_background = false;
presets = "cpu:0:default mem:0:default net:0:default";
proc_sorting = "memory";
update_ms = 1000;
vim_keys = true;
};
};
fzf = {
enable = true;
enableZshIntegration = true;
};
lazygit.enable = true;
ripgrep.enable = true;
zoxide = {
enable = true;
options = ["--cmd cd"];
};
};
# environment.sessionVariables = {};
home.packages = [
pkgs.lsd
];
}

112
modules/starship.nix Normal file
View File

@@ -0,0 +1,112 @@
{...}: {
programs.starship = {
enable = true;
settings = {
add_newline = true;
continuation_prompt = " ";
format = ''$directory$all$character'';
palette = "catppuccin_mocha";
scan_timeout = 120;
bun = {
format = "[🍞 bun $version ](bold green)";
version_format = "\${major}.\${minor}";
};
c = {
detect_extensions = ["c" "cpp"];
format = "[$symbol $name-$version ]($style)";
symbol = "";
version_format = "\${major}.\${minor}";
};
character = {
success_symbol = "[](bold green)";
error_symbol = "[](bold red)";
};
cmd_duration = {
disabled = true;
};
directory = {
home_symbol = "󰊠 ";
truncation_length = 2;
truncate_to_repo = true;
truncation_symbol = "󰊠 ";
style = "bold blue";
};
git_branch = {
format = "[ $symbol$branch ]($style)";
style = "bold purple";
symbol = " ";
always_show_remote = true;
};
# git_status = {
# format = "([$all_status$ahead_behind]($style))";
# up_to_date = "✓";
# ahead = "⇡\${count}";
# diverged = "⇕⇡\${ahead_count}⇣\${behind_count}";
# behind = "⇣\${count}";
# stashed = "📦 ";
# staged = "[++($count)](green)";
# };
golang = {
format = "[$symbol $version ](bold cyan)";
version_format = "\${major}.\${minor}";
symbol = " ";
};
hostname = {
ssh_only = true;
format = "[$ssh_symbol$hostname]($style)";
style = "bold green";
ssh_symbol = "󰇧 ";
disabled = false;
};
nodejs = {
detect_files = ["!bun.lockb"];
format = "[$symbol$version ]($style)";
version_format = "\${major}.\${minor}";
};
package = {
format = "[pkg $symbol$version]($style) ";
disabled = true;
};
palettes.catppuccin_mocha = {
rosewater = "#f5e0dc";
flamingo = "#f2cdcd";
pink = "#f5c2e7";
mauve = "#cba6f7";
red = "#f38ba8";
maroon = "#eba0ac";
peach = "#fab387";
yellow = "#f9e2af";
green = "#a6e3a1";
teal = "#94e2d5";
sky = "#89dceb";
sapphire = "#74c7ec";
blue = "#89b4fa";
lavender = "#b4befe";
text = "#cdd6f4";
subtext1 = "#bac2de";
subtext0 = "#a6adc8";
overlay2 = "#9399b2";
overlay1 = "#7f849c";
overlay0 = "#6c7086";
surface2 = "#585b70";
surface1 = "#45475a";
surface0 = "#313244";
base = "#1e1e2e";
mantle = "#181825";
crust = "#11111b";
};
};
};
}

37
modules/tmux.nix Normal file
View File

@@ -0,0 +1,37 @@
{pkgs, ...}: {
programs.tmux = {
enable = true;
baseIndex = 1;
historyLimit = 10000;
mouse = true;
prefix = "C-x";
plugins = [
pkgs.tmuxPlugins.vim-tmux-navigator
{
plugin = pkgs.tmuxPlugins.catppuccin;
}
];
extraConfig = "
set-option -sa terminal-overrides \",xterm*:Tc\"
set -s escape-time 0
# split panes using | and -
unbind '\"'
unbind %
bind _ split-window -h
bind - split-window -v
bind -r k select-pane -U
bind -r j select-pane -D
bind -r h select-pane -L
bind -r l select-pane -R
";
};
}

63
modules/zed.nix Normal file
View File

@@ -0,0 +1,63 @@
{...}: {
programs.zed-editor = {
enable = true;
extensions = [];
userSettings = {
auto_update = false;
buffer_font_size = 14;
buffer_font_family = "JetBrainsMono Nerd Font";
languages = {
"TypeScript" = {
code_actions_on_format = {
source.fixAll.eslint = true;
source.organizeImports = true;
};
formatter = "prettier";
};
};
tab_bar = {
show_nav_history_buttons = false;
};
tabs = {
file_icons = true;
git_status = true;
};
telemetery = {
diagnostics = false;
metrics = false;
};
terminal = {
font_size = 13;
line_height = "standard";
toolbar = {
breadcrumbs = false;
};
};
theme = {
mode = "dark";
light = "Rosé Pine";
dark = "Rosé Pine";
};
toolbar = {
breadcrumbs = false;
quick_actions = false;
};
ui_font_size = 14;
ui_font_family = "JetBrainsMono Nerd Font";
vim_mode = true;
};
};
}