summaryrefslogtreecommitdiff
path: root/machines/kusanagi/default.nix
AgeCommit message (Collapse)Author
2 dayscommon: parameterize LAN discovery interfacekusanagi-ollama-lan-firewallyokai
Let the shared LAN discovery module use each host's Wi-Fi interface instead of assuming kusanagi's wlp8s0 everywhere. Set kusanagi to wlp8s0 and enzo to wlp1s0. Reuse the same setting for kusanagi's Ollama LAN firewall rule so the service opening stays tied to the declared LAN interface. Assisted-by: OpenAI:gpt-5
2 dayskusanagi/ollama: expose service on wifi LANyokai
Bind Ollama on all interfaces but open its API only on kusanagi's Wi-Fi interface, so LAN clients can reach it without relying on Tailscale exposure. Remove the blanket tailscale0 trust from the shared firewall so tailnet traffic follows explicit host firewall rules instead of inheriting access to every listening service. Assisted-by: OpenAI:gpt-5
2 dayskusanagi/ollama: double default context, add 1h keep-aliveHenry J Webster
The 12B model at 32k context uses only 7.7 GB of the 7900 XT's 20 GB, so there is ample VRAM headroom for 64k with the q8_0 KV cache — agentic coding tools are context-hungry and 32k is the practical bottleneck. The keep-alive stops the default 5-minute idle unload from adding a reload stall to every resumed session on a single-user workstation. Update flake to get newer packages. Assisted-by: Claude Code:claude-fable-5
3 dayskusanagi/ollama: fix boot race with amdgpu, drop misdiagnosed HSA overrideHenry J. Webster
The recurring "ollama runs 100% on CPU" regressions were a boot-order race, not a gfx-target mismatch: ollama.service only ordered after network.target, and at boot it started between /dev/kfd and the 7900 XT's render node appearing. ollama probes GPUs once at startup, found none, and silently fell back to CPU until the next manual restart — which is why the previous HSA_OVERRIDE_GFX_VERSION commit "worked": the deploy restarted the service on a long-running system, and the restart was the actual cure. The card is a 7900 XT (Navi 31), natively gfx1100 — verified that discovery with no overrides finds it fine and drops only the unsupported Raphael iGPU (gfx1036). Remove HSA_OVERRIDE_GFX_VERSION and HIP_VISIBLE_DEVICES (ollama itself warns overriding visible devices can break discovery). Real fix: systemd-tag the kfd/renderD* char devices via udev (they get no device units otherwise) and order ollama after them, so discovery only runs once the GPU exists. Assisted-by: claude-code:claude-fable-5
3 daysprofiles: extract shared sandbox profile for enzo + kusanagiHenry J. Webster
Move the yokai agent-sandbox account (user, ikai group, /srv/git drop dir, scoped sudo de-escalation, and the local-clones workflow docs) out of machines/enzo into a shared profiles/sandbox.nix that both machines import. The only per-machine value is the human owner allowed to drop into the sandbox, exposed as a `sandbox.owner` string option so the profile stays username-agnostic (enzo: hwebs, kusanagi: henz). kusanagi gains the sandbox it didn't have before; enzo's inline block collapses to one setting. Assisted-by: claude-code:claude-opus-4-8
3 dayskusanagi/ollama: fix ROCm GPU fallback to CPU for GemmaHenry J. Webster
The RDNA3 card reports as gfx1101/gfx1102/gfx11-generic, which the ROCm build bundled with ollama-rocm has no kernels for, so ollama found no usable device and ran 100% on CPU after the nixpkgs bump. Force it to present as gfx1100 via HSA_OVERRIDE_GFX_VERSION. Also set OLLAMA_FLASH_ATTENTION=1 so the existing q8_0 KV cache actually engages instead of silently falling back to f16 and inflating VRAM use. Assisted-by: Claude-code:Opus-4.8
4 daysmigration away from x-clipHenry J. Webster
- replace x-clip with wl-clipboard for wayland machines - add TODOs I noticed while editing Assisted-by: Claude Code:claude-opus-4-8
6 dayskusanagi: remove non-working hiberationHenry J. Webster
Assisted-by: Claude:Opus-4.8
7 daysenzo/kusanagi: idle suspend via swayidleHenry J. Webster
Bare niri has no power daemon watching for inactivity, so neither box slept on its own. Add a user swayidle service bound to graphical-session.target that fires after 15 min of no input: - enzo: suspend-then-hibernate (matches the existing lid-switch policy) - kusanagi: plain suspend-to-RAM, plus Wake-on-LAN on enp9s0 so it can be woken remotely while the Kavita/Immich/Ollama/NFS servers sleep Assisted-by: Claude:claude-opus-4-8
7 daysrefactor: shared desktop profile for enzo + kusanagiHenry J. Webster
profiles/desktop.nix becomes a username-agnostic shared base (niri, dconf, the dark-theme portal fix, greetd, pipewire base, gpg agent, graphics, Firefox with blank-home/no-bookmarks prefs, common desktop tools, font base). Both hosts now import it. Per-host desktop config splits into machines/<host>/desktop.nix: - enzo: Adwaita cursor + monospace, HiDPI console font, yambar, hwebs groups. - kusanagi (new file): GNOME/X11, printing/avahi/udisks2, pro-audio (rtkit/jack/32-bit), gpg ssh support, richer fonts, Bibata cursor, henz desktop groups, waybar/nm-applet. Shared profile is username-agnostic (enzo=hwebs, kusanagi=henz): shared desktop tools moved to environment.systemPackages, per-user groups stay in machine files. Firefox now owned by the shared profile, so its redundant enable is dropped from profiles/apps.nix. Dark theme + Firefox tweaks now apply to both hosts. Both configurations build. Assisted-by: Claude:claude-opus-4-8
8 daysRestructure into a multi-machine flake and add the enzo laptopHenry J. Webster
Split the single-host config into a shared minimal base plus opt-in profiles, and add a second machine (enzo laptop) alongside kusanagi. - flake: add mkMachine helper; declare nixosConfigurations.kusanagi and .enzo; add the disko input; move overlays per-machine. - common/: minimal base only (boot, networking, tailscale, locale, nix settings, neovim editor). Old configuration.nix/programs.nix removed. - profiles/: coarse opt-in bundles (desktop, dev, apps). kusanagi imports all three and stays byte-for-byte identical to the running system. - machines/kusanagi/: all workstation-only config (ROCm, Scarlett audio, optical-disc archiving, NAS mounts, kavita/immich/ollama); hardware config moved here unchanged. User stays 'henz'. - machines/enzo/: new laptop. Declarative LUKS+btrfs via disko (LVM-on-LUKS, TPM2+PIN unlock, zram + encrypted swap for suspend-then-hibernate); its own minimal niri desktop with playback-only audio (no rtkit/jack); user 'hwebs'. Assisted-by: Claude:claude-opus-4-8