refactor: clean up NixOS config and drop cumbook #59

Merged
marti merged 8 commits from feature/config-cleanup into main 2026-10-26 17:50:03 +01:00
Owner

Summary

Cleans up the NixOS config: drops cumbook, moves per-host settings into the hosts, and fixes settings that were being ignored.

 modules/
 ├── base/
 │   ├── boot.nix         # - ideapad blacklist, - usbcore autosuspend
 │   ├── services.nix     # - seatd + its forced unit overrides
 │   ├── packages.nix     # - bat, eza (Home Manager owns them)
 │   └── zsh.nix          # run/shell now pass NIXPKGS_ALLOW_* to nix
 ├── desktop/
+│   ├── clipboard.nix    # services.cliphist + services.wl-clip-persist
 │   ├── packages.nix     # desktop scripts by name, not every flake package
 │   └── toolkits.nix     # Qt adwaita-dark; GTK font/cursor from the theme
 ├── features/coding/npm.nix   # + NPM_CONFIG_USERCONFIG
 ├── flake/devshell.nix   # inputs.graft -> agent-env's trail-code
-├── hardware/intel.nix
 └── hosts/
+    ├── _laptop-disko.nix     # shared LUKS + btrfs (cumpad, cumwork)
-    ├── cumbook/
     ├── cumpad/          # + niri output eDP-1 scale 1.25
     ├── cumputer/        # + niri output DP-1 2560x1440@240 scale 1.35
     └── cumwork/         # + niri output eDP-1 scale 1.5, NM captive DNS
 packages/scripts/
-├── src/wl-monitors.sh   # replaced by per-host niri outputs
 └── src/wl-autostart.sh  # no longer backgrounds clipboard daemons

deploy, remote-deploy, mksecret and secrets are no longer on $PATH. Run them with nix run $M4_FLAKE_PATH#<name>.

Evidence

  • Before: nix flake check failed because the devshell used an undeclared inputs.graft.
    After: nix flake check --no-build prints all checks passed!. cumpad, cumwork and cumputer all evaluate system.build.toplevel.

  • Before: values evaluated on cumwork's home config:

    NPM_CONFIG_USERCONFIG  null
    pointerCursor.size     32        (theme and niri use 36)
    gtk-font-name          "Adwaita Sans"   (size dropped)
    qt.style.name          "gtk2"    (installed adwaita-qt)
    captive dhcp-dns       systemd-networkd-dns wlan0
    

    After:

    NPM_CONFIG_USERCONFIG  /home/m4rti/.config/npm/npmrc
    pointerCursor.size     36,  gtk-cursor-theme-size=36
    gtk-font-name          Adwaita Sans 12
    qt.style.name          adwaita-dark
    captive dhcp-dns       nmcli dev show wlan0 | fgrep IP4.DNS
    
  • wl-autostart builds and passes shellcheck. No full system has been built or switched yet.

Merge Danger

Door: two-way

Everything here is config, so reverting the merge restores it. Nothing changes on disk until a host runs nixos-rebuild switch. The shared disko file is only read by disko-install and does not touch existing partitions.

Blast Radius: session

  • seatd is removed: niri should get its seat from logind instead. Check that niri still starts on the first login after switching.
  • Monitor layout now comes from niri outputs instead of wlr-randr. If an output name is wrong, that screen falls back to niri's default scale.
  • Clipboard history now runs as systemd user services tied to the graphical session.
  • cumbook can no longer be rebuilt from this flake.

🤖 Generated with Claude Code

## Summary Cleans up the NixOS config: drops cumbook, moves per-host settings into the hosts, and fixes settings that were being ignored. ```diff modules/ ├── base/ │ ├── boot.nix # - ideapad blacklist, - usbcore autosuspend │ ├── services.nix # - seatd + its forced unit overrides │ ├── packages.nix # - bat, eza (Home Manager owns them) │ └── zsh.nix # run/shell now pass NIXPKGS_ALLOW_* to nix ├── desktop/ +│ ├── clipboard.nix # services.cliphist + services.wl-clip-persist │ ├── packages.nix # desktop scripts by name, not every flake package │ └── toolkits.nix # Qt adwaita-dark; GTK font/cursor from the theme ├── features/coding/npm.nix # + NPM_CONFIG_USERCONFIG ├── flake/devshell.nix # inputs.graft -> agent-env's trail-code -├── hardware/intel.nix └── hosts/ + ├── _laptop-disko.nix # shared LUKS + btrfs (cumpad, cumwork) - ├── cumbook/ ├── cumpad/ # + niri output eDP-1 scale 1.25 ├── cumputer/ # + niri output DP-1 2560x1440@240 scale 1.35 └── cumwork/ # + niri output eDP-1 scale 1.5, NM captive DNS packages/scripts/ -├── src/wl-monitors.sh # replaced by per-host niri outputs └── src/wl-autostart.sh # no longer backgrounds clipboard daemons ``` `deploy`, `remote-deploy`, `mksecret` and `secrets` are no longer on `$PATH`. Run them with `nix run $M4_FLAKE_PATH#<name>`. ## Evidence - **Before:** `nix flake check` failed because the devshell used an undeclared `inputs.graft`. **After:** `nix flake check --no-build` prints `all checks passed!`. cumpad, cumwork and cumputer all evaluate `system.build.toplevel`. - **Before:** values evaluated on cumwork's home config: ```text NPM_CONFIG_USERCONFIG null pointerCursor.size 32 (theme and niri use 36) gtk-font-name "Adwaita Sans" (size dropped) qt.style.name "gtk2" (installed adwaita-qt) captive dhcp-dns systemd-networkd-dns wlan0 ``` **After:** ```text NPM_CONFIG_USERCONFIG /home/m4rti/.config/npm/npmrc pointerCursor.size 36, gtk-cursor-theme-size=36 gtk-font-name Adwaita Sans 12 qt.style.name adwaita-dark captive dhcp-dns nmcli dev show wlan0 | fgrep IP4.DNS ``` - `wl-autostart` builds and passes shellcheck. No full system has been built or switched yet. ## Merge Danger **Door:** two-way Everything here is config, so reverting the merge restores it. Nothing changes on disk until a host runs `nixos-rebuild switch`. The shared disko file is only read by disko-install and does not touch existing partitions. **Blast Radius:** session - seatd is removed: niri should get its seat from logind instead. Check that niri still starts on the first login after switching. - Monitor layout now comes from niri outputs instead of wlr-randr. If an output name is wrong, that screen falls back to niri's default scale. - Clipboard history now runs as systemd user services tied to the graphical session. - cumbook can no longer be rebuilt from this flake. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Its intel hardware module goes with it, and so does the ideapad_laptop
blacklist in modules/base: no remaining host is an IdeaPad.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- cumpad and cumwork share one LUKS + btrfs disko layout; cumputer is a
  desktop and keeps its own unencrypted one
- output scale and mode move from the wl-monitors hostname switch into
  each host's niri outputs, and the script goes away
- cumwork no longer forces the systemd-networkd captive-portal DNS helper;
  it runs NetworkManager, which the module picks on its own

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- cliphist and wl-clip-persist were backgrounded from wl-autostart with no
  lifecycle; services.cliphist and services.wl-clip-persist tie them to
  the graphical session
- desktops install the packages/scripts helpers by name instead of every
  flake package; deploy, remote-deploy, mksecret and secrets stay off
  $PATH and run with nix run

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Qt asked for the gtk2 style while installing adwaita-qt; use adwaita-dark,
  whose packages Home Manager installs
- the manual gtk-font-name dropped the font size and gtk-cursor-theme-size
  duplicated what gtk.font and home.pointerCursor generate
- home.pointerCursor now carries the theme's size (36), so XCURSOR_SIZE no
  longer falls back to 32

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- npm: export NPM_CONFIG_USERCONFIG, npm otherwise only reads ~/.npmrc
- zsh run/shell: the NIXPKGS_ALLOW_* assignments were shell variables the
  nix command never saw
- devshell: take trail-code (formerly graft) from agent-env's pin; the
  undeclared inputs.graft broke nix flake check

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
niri gets its seat from logind through libseat, and seatd only ran with
its unit forced back to Type=simple. bat and eza are installed by their
Home Manager programs modules.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
It was meant to cut USB power on cumputer while it is off, but
autosuspend=-1 only disables runtime autosuspend on a running kernel.
Power to the ports in S5 is a firmware setting (ErP / USB power in S5).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
marti merged commit 74446f3be3 into main 2026-10-26 17:50:03 +01:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
marti/nix!59
No description provided.