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.
This commit is contained in:
46
CLAUDE.md
Normal file
46
CLAUDE.md
Normal file
@@ -0,0 +1,46 @@
|
||||
# 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/ # one file per installable program
|
||||
fonts.nix # font config
|
||||
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
|
||||
|
||||
1. Create `home/programs/<name>.nix`:
|
||||
|
||||
```nix
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = [ pkgs.<package-name> ];
|
||||
}
|
||||
```
|
||||
|
||||
The filename is the program name; the package attribute can differ (e.g. `godot.nix` uses `pkgs.godot_4`).
|
||||
|
||||
2. Add the import to whichever hosts should have it in `hosts/<host>/home.nix`:
|
||||
|
||||
```nix
|
||||
../../home/programs/<name>.nix
|
||||
```
|
||||
|
||||
## Rules
|
||||
|
||||
- `home/packages-base.nix` — shared baseline, imported by every host. Only add truly universal tools here (shell utilities, editors).
|
||||
- `home/programs/` — one file per program. 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`.
|
||||
@@ -1,4 +1,39 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = [ pkgs.rustup ];
|
||||
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
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user