Compare commits

...

10 Commits

Author SHA1 Message Date
231027cd5b add tea (Gitea CLI) to home packages 2026-08-13 13:02:42 +02:00
19e2f737bc Fix stale documentation in CLAUDE.md
- Remove deleted fonts.nix from directory layout
- Update 'Adding a New Program' section to reflect ponytail cleanup: simple packages go in common.nix, per-file only for programs needing real configuration
- Update Rules section to document common.nix and per-file program patterns
2026-08-12 15:57:10 +02:00
6440a4dc70 Remove rofi ssh mode and tmux-navigator cmd block
The ssh rofi mode serves no purpose with no SSH hosts configured.
The cmd block in tmux-navigator only affects lazy loading, which is disabled.
2026-08-12 15:50:52 +02:00
c53829cbb3 Remove dead fonts.nix stub
home/fonts.nix only set fonts.fontconfig.enable = true, which home-manager
enables automatically when font packages are declared. Delete the file and
remove its imports from both host home.nix files.
2026-08-12 15:49:50 +02:00
c9424ffd09 Fix qtile config: consolidate terminal variable and remove unused imports 2026-08-12 15:46:19 +02:00
a569683ea0 Inline one-liner system modules into host defaults
- services.openssh.enable, virtualisation.docker.enable into hivebrain
- services.displayManager.sddm.enable, services.desktopManager.plasma6.enable into nikita-nixos
- Remove four no-longer-needed system modules
2026-08-12 15:43:43 +02:00
9a3f7807e1 Remove empty LazyVim config stubs
LazyVim loads its defaults without these files present, so the empty
stubs are unnecessary overhead.
2026-08-12 15:41:56 +02:00
1d7c4cebeb Collapse 26 trivial single-package programs into home/programs/common.nix
Consolidates alacritty, audacity, blender, blockbench, claude-code, fd,
filezilla, fzf, gcc, godot_4, imv, jdk21, jetbrains-toolbox, lazygit,
lua-language-server, mpv, nil, nixpkgs-fmt, nodejs, obsidian, pkg-config,
prismlauncher, vesktop, xclip, xwallpaper, yt-dlp into a single list.

rustup.nix kept separate due to its configuration (session vars, many deps).

Updates imports:
- hivebrain: all 26 + rustup now via common.nix + rustup.nix
- nikita-nixos: blender.nix → common.nix (gets all lightweight tools)
2026-08-12 15:37:35 +02:00
ee386e1ad4 Merge remote; add nix auto-GC and CLAUDE.md
Resolves conflict with upstream tmux/blender additions (already covered
by the per-program restructure). Adds weekly nix GC (--delete-older-than 7d),
store auto-optimise, and project CLAUDE.md.
2026-08-12 15:29:45 +02:00
bc828f7adf Restructure packages into per-program home/programs/ modules
Replaces the monolithic packages-marvin.nix with one file per program
so hosts can opt in selectively. Adds docker, clamav, steam, and
audio keybindings for hivebrain. Fixes monitor order and switches
volume widget to PulseVolume.
2026-08-12 15:28:06 +02:00
25 changed files with 155 additions and 66 deletions

48
CLAUDE.md Normal file
View File

@@ -0,0 +1,48 @@
# NixOS Dotfiles
## Directory Layout
```
flake.nix # entry point, defines hosts
hosts/
hivebrain/ # marvin's main machine
nikita-nixos/ # nikita's machine
home/
packages-base.nix # universal packages every host gets (neovim, ripgrep, etc.)
programs/ # installable programs (common.nix for simple packages, per-file for configured programs)
rofi.nix # rofi config + packages
symlinks.nix # home-manager symlinks
tmux.nix # tmux config
yazi.nix # yazi config
zsh.nix # zsh config
system/ # NixOS system-level modules
```
## Adding a New Program
**For simple packages (no config):** Add the package to `home/programs/common.nix`'s `home.packages` list.
**For programs that need configuration** (session variables, extra options, dependencies): Create `home/programs/<name>.nix`:
```nix
{ pkgs, ... }:
{
# configuration + packages
}
```
Then add the import to `hosts/<host>/home.nix`:
```nix
../../home/programs/<name>.nix
```
Example: `rustup.nix` needs config (session variables) so it gets its own file. Simple packages like `lazygit` go in `common.nix`.
## Rules
- `home/packages-base.nix` — shared baseline, imported by every host. Only add truly universal tools here (shell utilities, editors).
- `home/programs/common.nix` — simple packages that just need to be installed (no extra config).
- `home/programs/<name>.nix` — programs that need real configuration beyond just `home.packages`. Hosts opt in by importing.
- `home/<tool>.nix` (tmux, zsh, rofi, etc.) — for programs that need configuration beyond just installing a package. Same opt-in pattern via host imports.
- `system/` modules are NixOS system-level config (not home-manager). Add them to `hosts/<host>/default.nix`.

View File

@@ -1,2 +0,0 @@
-- Autocmds are automatically loaded on the VeryLazy event
-- Default autocmds: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua

View File

@@ -1,2 +0,0 @@
-- Options are automatically loaded before lazy.nvim startup
-- Default options: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua

View File

@@ -2,12 +2,5 @@ return {
{
"christoomey/vim-tmux-navigator",
lazy = false,
cmd = {
"TmuxNavigateLeft",
"TmuxNavigateDown",
"TmuxNavigateUp",
"TmuxNavigateRight",
"TmuxNavigatePrevious",
},
},
}

View File

@@ -1,15 +1,12 @@
from libqtile import bar, extension, hook, layout, qtile, widget
from libqtile.config import Click, Drag, Group, Key, KeyChord, Match, Screen
from libqtile import bar, hook, layout, qtile, widget
from libqtile.config import Click, Drag, Group, Key, Match, Screen
from libqtile.lazy import lazy
from libqtile.utils import guess_terminal
import os
import subprocess
mod = "mod4"
terminal = guess_terminal()
myTerm = "alacritty"
terminal = "alacritty"
keys = [
Key([mod], "h", lazy.layout.left(), desc="Move focus to left"),
@@ -60,6 +57,9 @@ keys = [
lazy.spawn('sh -c "maim -s | xclip -selection clipboard -t image/png -i"'),
desc="Screenshot"
),
Key([mod], "F6", lazy.spawn("wpctl set-volume -l 1.0 @DEFAULT_AUDIO_SINK@ 5%+"), desc="Volume up 5%"),
Key([mod], "F5", lazy.spawn("wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"), desc="Volume down 5%"),
Key([mod], "F4", lazy.spawn("wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"), desc="Mute toggle"),
]
# Add key bindings to switch VTs in Wayland.
@@ -218,18 +218,18 @@ def make_top_bar(primary=False):
widget.CPU(
foreground = colors[4],
padding = 8,
mouse_callbacks = {'Button1': lambda: qtile.cmd_spawn(myTerm + ' -e btop')},
mouse_callbacks = {'Button1': lambda: qtile.cmd_spawn(terminal + ' -e btop')},
format="CPU: {load_percent}%",
),
make_sep(),
widget.Memory(
foreground = colors[8],
padding = 8,
mouse_callbacks = {'Button1': lambda: qtile.cmd_spawn(myTerm + ' -e btop')},
mouse_callbacks = {'Button1': lambda: qtile.cmd_spawn(terminal + ' -e btop')},
format = 'Mem: {MemUsed:.0f}{mm}',
),
make_sep(),
widget.Volume(
widget.PulseVolume(
foreground = colors[7],
padding = 8,
fmt = 'Vol: {}',
@@ -249,8 +249,8 @@ def make_top_bar(primary=False):
screens = [
Screen(top = make_top_bar()),
Screen(top = make_top_bar(primary=True)),
Screen(top = make_top_bar()),
]
# Drag floating layouts.

View File

@@ -1,5 +0,0 @@
{ pkgs, ... }:
{
home.packages = [ pkgs.blender ];
}

View File

@@ -1,5 +0,0 @@
{ ... }:
{
fonts.fontconfig.enable = true;
}

View File

@@ -5,6 +5,7 @@
neovim
nerd-fonts.jetbrains-mono
ripgrep
tea
unzip
];
}

View File

@@ -1,23 +1,31 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
alacritty
audacity
blender
blockbench
claude-code
fd
filezilla
fzf
gcc
godot_4
imv
jdk21
jetbrains-toolbox
lazygit
lua-language-server
mpv
nil
nixpkgs-fmt
nodejs
obsidian
pkg-config
rustup
steam
prismlauncher
vesktop
xclip
xwallpaper
yt-dlp
];
}

39
home/programs/rustup.nix Normal file
View File

@@ -0,0 +1,39 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
rustup
sqlx-cli
openssl.dev
# Bevy / Wayland runtime deps
wayland
wayland-protocols
libxkbcommon
libGL
vulkan-loader
alsa-lib
udev
libx11
libxcursor
libxi
libxrandr
libxcb
];
home.sessionVariables.PKG_CONFIG_PATH = "${pkgs.openssl.dev}/lib/pkgconfig";
# ponytail: global LD_LIBRARY_PATH so `cargo run` finds these without a shell.nix
home.sessionVariables.LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath (with pkgs; [
wayland
libxkbcommon
libGL
vulkan-loader
alsa-lib
udev
libx11
libxcursor
libxi
libxrandr
libxcb
]);
}

View File

@@ -10,7 +10,6 @@
"drun"
"run"
"window"
"ssh"
];
extraConfig = {
show-icons = true;

View File

@@ -45,7 +45,7 @@
bind-key -T copy-mode-vi y send -X copy-pipe-and-cancel 'xclip -selection clipboard -i'
# Default layout on new session: main + right pane (~20%) + bottom pane (~15%)
set-hook -g session-created 'split-window -h -l 20% -c "#{pane_current_path}" ; select-pane -t 0 ; split-window -v -l 15% -c "#{pane_current_path}" ; select-pane -t 0'
set-hook -g session-created 'split-window -v -l 15% -c "#{pane_current_path}" ; select-pane -t 1 ; split-window -h -l 20% -c "#{pane_current_path}" ; select-pane -t 1'
'';
};
}

View File

@@ -10,7 +10,6 @@
../../system/locale.nix
../../system/fonts.nix
../../system/nix.nix
../../system/ssh.nix
../../system/programs.nix
../../system/packages.nix
@@ -19,8 +18,14 @@
../../system/picom.nix
../../system/display-managers/ly.nix
../../system/users/marvin.nix
../../system/clam.nix
];
networking.hostName = "hivebrain";
system.stateVersion = "26.05";
services.openssh.enable = true;
virtualisation.docker.enable = true;
programs.steam.enable = true;
}

View File

@@ -3,14 +3,13 @@
{
imports = [
../../home/zsh.nix
../../home/fonts.nix
../../home/rofi.nix
../../home/yazi.nix
../../home/symlinks.nix
../../home/packages-base.nix
../../home/packages-marvin.nix
../../home/tmux.nix
../../home/blender.nix
../../home/packages-base.nix
../../home/programs/common.nix
../../home/programs/rustup.nix
];
home.username = "marvin";

View File

@@ -14,11 +14,12 @@
../../system/packages.nix
# nikita-only
../../system/plasma.nix
../../system/display-managers/sddm.nix
../../system/users/nikita.nix
];
networking.hostName = "nikita-nixos";
system.stateVersion = "26.05";
services.displayManager.sddm.enable = true;
services.desktopManager.plasma6.enable = true;
}

View File

@@ -3,11 +3,10 @@
{
imports = [
../../home/zsh.nix
../../home/fonts.nix
../../home/yazi.nix
../../home/symlinks.nix
../../home/packages-base.nix
../../home/blender.nix
../../home/programs/common.nix
];
home.username = "nikita";

13
system/clam.nix Normal file
View File

@@ -0,0 +1,13 @@
{ pkgs, ... }:
{
environment.systemPackages = [
pkgs.clamav
pkgs.clamtk
];
services = {
clamav.daemon.enable = true;
clamav.updater.enable = true;
};
}

View File

@@ -1,5 +0,0 @@
{ ... }:
{
services.displayManager.sddm.enable = true;
}

View File

@@ -2,4 +2,8 @@
{
networking.networkmanager.enable = true;
# Steam LAN game transfer + Remote Play
networking.firewall.allowedTCPPorts = [ 27036 27037 27040 ];
networking.firewall.allowedUDPPorts = [ 27031 27036 ];
}

View File

@@ -3,4 +3,11 @@
{
nix.settings.experimental-features = [ "nix-command" "flakes" ];
nixpkgs.config.allowUnfree = true;
nix.gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 7d";
};
nix.settings.auto-optimise-store = true;
}

View File

@@ -1,5 +0,0 @@
{ ... }:
{
services.desktopManager.plasma6.enable = true;
}

View File

@@ -1,7 +1,9 @@
{ ... }:
{ pkgs, ... }:
{
programs.firefox.enable = true;
programs.zsh.enable = true;
programs.nix-ld.enable = true;
environment.systemPackages = [ pkgs.ungoogled-chromium ];
}

View File

@@ -1,5 +0,0 @@
{ ... }:
{
services.openssh.enable = true;
}

View File

@@ -3,7 +3,7 @@
{
users.users.marvin = {
isNormalUser = true;
extraGroups = [ "wheel" ];
extraGroups = [ "wheel" "docker" ];
shell = pkgs.zsh;
packages = with pkgs; [
tree

View File

@@ -11,16 +11,16 @@
'';
xrandrHeads = [
{
output = "HDMI-1";
output = "DP-3";
primary = true;
monitorConfig = ''
Option "Position" "0 0"
'';
}
{
output = "DP-1";
primary = true;
output = "HDMI-1";
monitorConfig = ''
Option "Position" "1920 0"
Option "Position" "3440 0"
'';
}
];