Skip to content

Commit 3eac855

Browse files
committed
General cleanup and configuration adjustments
1 parent d6b4976 commit 3eac855

15 files changed

Lines changed: 125 additions & 28 deletions

File tree

home/dev.nix

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
# --- LANGUAGES & TOOLCHAINS ---
1414
docker-compose
1515
nodejs
16+
python3 # stdlib + interpreter for AI agent scripts (parse, JSON, regex);
17+
# for pip-installed libs use a venv: `python3 -m venv .venv`
1618

1719
# --- DATA & FORMATTING ---
1820
sqlite
@@ -21,7 +23,12 @@
2123
bash-language-server
2224
shellcheck
2325
luajitPackages.lua-lsp
24-
nil
26+
nixd # Nix LSP (eval-aware; supersedes the older nil)
27+
# alejandra lives in home/shell/packages.nix under NIX TOOLS
28+
gopls # Go LSP
29+
pyright # Python LSP
30+
typescript-language-server # JS/TS LSP
31+
taplo # TOML LSP + formatter
2532

2633
# --- UTILS ---
2734
];

home/distrobox.nix

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@
99
# --- Distrobox: GC Survival ---
1010
# Link stable host-side paths so exported helpers survive profile updates and garbage collection.
1111
sessionVariables = {
12-
DBX_CONTAINER_ALWAYS_PULL = "1";
13-
# Force Distrobox to mount the stable symlink instead of the raw /nix/store path
12+
# Don't pull the image on every `distrobox enter` — saves seconds +
13+
# bandwidth per shell. Use `db-up` (distrobox assemble) for explicit
14+
# refreshes when an image needs updating.
15+
DBX_CONTAINER_ALWAYS_PULL = "0";
1416
DBX_NON_INTERACTIVE = "1";
1517
};
1618

home/ghostty.nix

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ _: {
2020

2121
scrollback-limit = 10000;
2222

23+
# Each tab gets its own systemd transient cgroup. A runaway tab
24+
# (claude/codex/btop) can't starve the rest of the terminal.
25+
linux-cgroup = "always";
26+
2327
# Tabs hidden — tmux handles windows/panes.
2428
gtk-tabs-location = "hidden";
2529

home/lazyvim.nix

Lines changed: 40 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,12 @@
1313
withPython3 = false;
1414

1515
extraPackages = with pkgs; [
16-
# LazyVim dependencies
16+
# LazyVim-specific deps. ripgrep/fd/gnumake/gcc/unzip/tree-sitter live
17+
# on user PATH via home/dev.nix + home/shell/packages.nix — neovim
18+
# finds them there, so no need to duplicate into the wrapper.
1719
lazygit
18-
ripgrep
19-
fd
2020

21-
# Build tools often needed by Mason/Lazy
22-
gnumake
23-
gcc
24-
unzip
25-
tree-sitter
26-
27-
# Language servers / Formatters
21+
# Language servers / Formatters not shared with other tools
2822
lua-language-server
2923
stylua
3024
];
@@ -44,14 +38,28 @@
4438
require("lazy").setup({
4539
spec = {
4640
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
41+
-- Language extras (need matching LSPs on PATH via home/dev.nix)
42+
{ import = "lazyvim.plugins.extras.lang.nix" },
43+
{ import = "lazyvim.plugins.extras.lang.go" },
44+
{ import = "lazyvim.plugins.extras.lang.typescript" },
45+
{ import = "lazyvim.plugins.extras.lang.python" },
46+
{ import = "lazyvim.plugins.extras.lang.toml" },
47+
{ import = "lazyvim.plugins.extras.lang.markdown" },
4748
{ import = "plugins" },
4849
},
4950
defaults = {
5051
lazy = false,
5152
version = false,
5253
},
53-
install = { colorscheme = { "tokyonight", "habamax" } },
54+
install = { colorscheme = { "catppuccin-mocha", "habamax" } },
5455
checker = { enabled = false },
56+
-- Plugin specs come from immutable Nix store paths; the rebuild bumps
57+
-- the path on every HM switch and lazy.nvim emits noisy "config
58+
-- changed" reload prompts. Disable detection entirely.
59+
change_detection = {
60+
enabled = false,
61+
notify = false,
62+
},
5563
performance = {
5664
rtp = {
5765
disabled_plugins = {
@@ -70,8 +78,27 @@
7078
vim.g.mapleader = " "
7179
'';
7280

73-
"nvim/lua/plugins/example.lua".text = ''
74-
return {}
81+
"nvim/lua/plugins/colorscheme.lua".text = ''
82+
return {
83+
{ "catppuccin/nvim", name = "catppuccin", priority = 1000 },
84+
{
85+
"LazyVim/LazyVim",
86+
opts = { colorscheme = "catppuccin-mocha" },
87+
},
88+
}
89+
'';
90+
91+
# Disable Mason entirely. Mason downloads prebuilt ELF binaries that
92+
# need a glibc FHS layout — broken on NixOS. nvim-lspconfig keeps
93+
# running and picks up LSPs/formatters from system PATH (installed
94+
# via home/dev.nix + home/shell/packages.nix).
95+
"nvim/lua/plugins/disable-mason.lua".text = ''
96+
return {
97+
{ "mason-org/mason.nvim", enabled = false },
98+
{ "mason-org/mason-lspconfig.nvim", enabled = false },
99+
{ "WhoIsSethDaniel/mason-tool-installer.nvim", enabled = false },
100+
{ "jay-babu/mason-nvim-dap.nvim", enabled = false },
101+
}
75102
'';
76103
};
77104
}

home/niri.nix

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,7 @@ in {
163163
home.packages = with pkgs; [
164164
brightnessctl # Screen brightness control
165165
swaybg # Wallpaper daemon
166-
wl-clipboard # wl-copy / wl-paste
167-
cliphist # Clipboard history
166+
# wl-clipboard + cliphist live in home/shell/packages.nix
168167
grim # Screen capture
169168
slurp # Region picker
170169
wf-recorder # Screen recorder (Wayland)
@@ -176,6 +175,20 @@ in {
176175
programs.niri.settings = {
177176
prefer-no-csd = true;
178177

178+
# Screenshots land in a single dated folder instead of niri's default
179+
# scatter pattern. Path is expanded by niri itself; ~ → $HOME.
180+
screenshot-path = "~/Pictures/Screenshots/Screenshot %Y-%m-%d %H-%M-%S.png";
181+
182+
# Privacy: hide notifications from screencast/recording sinks. Mako
183+
# uses the `notifications` layer namespace; password-manager-style
184+
# toast notifications stay out of OBS/xdg-desktop-portal captures.
185+
layer-rules = [
186+
{
187+
matches = [{namespace = "^notifications$";}];
188+
block-out-from = "screencast";
189+
}
190+
];
191+
179192
# LG UltraGear 49" — pin to native 144Hz mode.
180193
outputs."DP-1" = {
181194
mode = {
@@ -279,6 +292,7 @@ in {
279292
"Mod+B".action = spawn "brave";
280293
"Mod+Ctrl+L".action = spawn "swaylock";
281294
"Mod+Shift+P".action = spawn "wlogout" "-b" "2";
295+
"Mod+Shift+N".action.spawn = ["makoctl" "mode" "-t" "do-not-disturb"];
282296
"Mod+S".action = spawn (lib.getExe audioSinkMenu);
283297
"Mod+V".action = sh "cliphist list | fuzzel --dmenu | cliphist decode | wl-copy";
284298

home/notifications.nix

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ _: {
1818
default-timeout = 0;
1919
border-size = "2";
2020
};
21+
22+
# Do-Not-Disturb mode — toggle with `makoctl mode -t do-not-disturb`
23+
# (bound to Mod+Shift+N in home/niri.nix). Hides all notifications
24+
# while active; they still accumulate in `makoctl history`.
25+
"mode=do-not-disturb".invisible = "1";
2126
};
2227
};
2328
}

home/screenlock.nix

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@
1212
indicator-radius = 120;
1313
indicator-thickness = 8;
1414
fade-in = "0.2";
15+
# Pressing Enter with no input shouldn't fire a full PAM cycle (the
16+
# YubiKey U2F prompt takes a few seconds to time out). Show failed
17+
# attempts so a wrong-password vs forgotten-tap is obvious.
18+
ignore-empty-password = true;
19+
show-failed-attempts = true;
1520
};
1621
};
1722

home/shell/env.nix

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@
1212
ATUIN_NO_MODIFY_DB = "true";
1313
QA_INFRA_DIR = "/home/${userConfig.username}/repos/qa-infra-automation";
1414
};
15+
16+
# Propagate user-local bin dirs to every launcher — niri spawn, desktop
17+
# entries, systemd user units — not just interactive bash.
18+
sessionPath = [
19+
"$HOME/.local/bin"
20+
"$HOME/bin"
21+
];
1522
};
1623

1724
xdg = {

home/shell/init.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ _: {
99
fi
1010
unset current_tty
1111
12-
# Ensure local binaries are in PATH
13-
export PATH="$PATH:$HOME/.local/bin:$HOME/bin"
12+
# Note: $HOME/.local/bin and $HOME/bin are added via home.sessionPath
13+
# in home/shell/env.nix so niri spawn and desktop entries also see them.
1414
1515
# --- Distrobox Atuin Fix (Persistent Loop) ---
1616
if [ -d "/run/host/nix/store" ]; then

home/shell/programs.nix

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,16 @@
4040
style = "compact";
4141
inline_height = 20;
4242
filter_mode = "global";
43-
filter_mode_shell_up = "global";
43+
# Up arrow walks the current directory's history first (most useful
44+
# day-to-day); global Ctrl-R search still searches everything.
45+
filter_mode_shell_up = "directory";
4446
search_mode = "fuzzy";
47+
# Don't auto-run picked commands on Enter — paste to prompt, let
48+
# the user press Enter again to execute. Prevents accidental
49+
# destructive command replays.
50+
enter_accept = false;
51+
# Auto-scope history per git repo when inside one.
52+
workspaces = true;
4553
};
4654
};
4755

0 commit comments

Comments
 (0)