- Nix 80.7%
- Lua 19.3%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
Drop the caelestia-shell and caelestia-dots inputs and everything that existed to serve them (qtengine, ydotool, gpu-screen-recorder, i2c, geoclue/gammastep, extra fonts, Firefox and Vesktop theming). The desktop is now Hyprland in master/stack layout with short animations, configured in a plain Lua file, plus small separate programs: waybar, fuzzel (app, clipboard and power menus), mako, hyprlock, hypridle, swaybg and foot. Colours come from one fixed palette in home/desktop/palette.nix. Also put the home-manager Firefox on the system PATH, so Claude Desktop can open a browser for sign-in. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> |
||
| home | ||
| hosts | ||
| modules/nixos | ||
| profiles | ||
| .editorconfig | ||
| .envrc | ||
| .gitignore | ||
| flake.lock | ||
| flake.nix | ||
| README.md | ||
| statix.toml | ||
nixfiles
NixOS configuration for every machine I run, as one flake.
| Host | Hardware | Role |
|---|---|---|
walkies |
Framework Laptop 12 (13th gen) | workstation |
leash |
Framework Laptop 12 (13th gen) | workstation |
Layout
flake.nix inputs, identity (`vars`), host discovery
hosts/<name>/ one directory per machine: default.nix + hardware-configuration.nix
profiles/ roles a host picks: workstation.nix, server.nix
modules/nixos/
core/ every host: nix settings, boot, users, firewall, ssh policy
desktop/ Hyprland session, audio, fonts, laptop services
hardware/ per-model hardware modules
security-research.nix capture privileges, binfmt, device groups
virtualisation.nix libvirt/QEMU, podman
server.nix headless additions: sshd, fail2ban
home/ home-manager, same split
core/ git, fish, CLI tools (every host)
desktop/ Hyprland, bar, menu, themes, GUI apps
security/ the toolbox
A host imports its hardware scan and exactly one profile. A profile is a list
of modules. Everything a host does differently from its role goes in its own
default.nix.
Daily use
nh os switch # rebuild and activate this host
nh os boot # rebuild, activate on next boot
nix flake update # bump everything; then nh os switch
nix flake check # evaluate and build every host
nix fmt # format
nh knows where this repo is (programs.nh.flake), so no path is needed.
Old generations are garbage-collected weekly, keeping the last 5 and 14 days.
Flakes only see files git knows about: git add new files before rebuilding.
Adding a host
Hosts are discovered from hosts/; there is no list to edit.
leash (or any further Framework 12): on that machine, after a stock install,
git clone <this repo> ~/nixfiles && cd ~/nixfiles
nixos-generate-config --show-hardware-config > hosts/leash/hardware-configuration.nix
# copy the swap `boot.initrd.luks.devices` line from /etc/nixos/configuration.nix
# into hosts/leash/default.nix, as hosts/walkies/default.nix does
git add hosts/leash
sudo nixos-rebuild boot --flake .#leash && reboot
A server: create hosts/<name>/default.nix,
{
imports = [
./hardware-configuration.nix
../../profiles/server.nix
];
system.stateVersion = "26.05"; # the release it was installed with
}
add its hardware scan next to it, and put your SSH public key in
vars.sshKeys in flake.nix (servers are key-only and refuse to build
without one).
Desktop
Hyprland in master/stack layout (dwm-like), with a text bar and short
animations. Small separate programs, all configured in home/desktop:
hypr/hyprland.lua: the compositor, a plain Lua file. Keybinds are here.hyprland.nix: wallpaper (swaybg), lock (hyprlock), idle (hypridle), and themenu-power,menu-clipboardandscreenshotscripts.shell.nix: bar (waybar), app menu (fuzzel), notifications (mako), terminal (foot), GTK/Qt themes.palette.nix: every colour and the UI font. Change them here only.
Keys (Super +) |
Action |
|---|---|
Return |
terminal |
Space |
app menu |
W / E |
browser / files |
Q |
close window |
J / K |
focus next / previous window |
Shift+J / Shift+K |
move window down / up the stack |
Shift+Return |
swap window with the master |
H / L |
shrink / grow the master area |
I / D |
one more / one fewer master window |
F / M |
fullscreen / monocle |
Shift+Space |
toggle floating |
1-9 / Shift+1-9 |
go to workspace / send window there |
Tab |
previous workspace |
` / Shift+` |
scratchpad / send window to it |
, . (with Shift) |
focus (move window to) other monitor |
V |
clipboard history |
Shift+S or Print |
screenshot a region (Shift+Print: screen) |
Shift+C |
colour picker |
B |
hide / show the bar |
Escape |
lock |
Shift+E |
power menu |
Arrow keys focus by direction (Shift moves), Super+drag moves a window,
Super+right-drag resizes it.