4094 Commits
Author SHA1 Message Date
Gabriel Fontes 6338b93a5d feat(home/hyprland): invert focus_on_activate
Almost everything that requests activation is being rude about it, and with
follow_mouse on it turns into a focus fight. Default to off and opt browsers
back in, so opening a link from another app still raises the browser.

Makes the LinOffice focus rule redundant; the maximize suppression stays,
since that one is Excel being Excel rather than a focus policy.

Assisted-by: pi (claude-opus-5)
2026-08-07 20:43:09 -03:00
Gabriel Fontes 09b4856163 feat(home/hyprland): tame LinOffice RemoteApp windows
FreeRDP RemoteApp windows mirror the Windows-side focus state, so Office
requests activation constantly. With focus_on_activate and follow_mouse both
on, that ping-pongs: 22 unprompted focus flips in 30s between Excel and the
terminal under the cursor, which also made clicks land on a window that was
mid-flip. Each activation carries a maximize request too, which read as the
window spontaneously fullscreening whenever it regained focus.

Assisted-by: pi (claude-opus-5)
2026-08-07 20:39:43 -03:00
Gabriel Fontes e5ae4001e3 fix(merope): bound stalls and stop swapping onto the contended disk
merope hung for ~48min (16:59-17:56 on 2026-08-07) with all four cores
pinned. No OOM, no panic, no thermal event -- it simply stopped making
progress and needed a manual power cycle.

Root cause: /swap/swapfile lives on sda, the same USB SSD as the rootfs.
swappiness=60 had ratcheted ~4.2G of cold anonymous pages onto it over
days (monotonically -- it never came back). A torrent write plus a Radarr
cross-disk import then saturated that device at ~85MiB/s, so page-ins
queued behind bulk I/O indefinitely. Nothing exceeded a memory limit, so
the kernel OOM killer never engaged.

All four USB ports share one VL805 controller on a single PCIe lane, so
relocating swap to another disk would not have given it an independent
path.

- watchdog: bound any future stall to a reboot instead of a silent hang
- ondemand: merope never exceeded 600MHz of its 1500MHz in 4h of 100% load
- swappiness=10: MemAvailable never fell below 3.6G, swap is not
  load-bearing here; keep the swapfile as a backstop, not a habit
- psi=1 + earlyoom: the kernel was not even measuring stall time

Assisted-by: pi (claude-opus-5)
2026-08-07 18:23:09 -03:00
Gabriel Fontes 264ce2d6f3 feat(home/productivity): add mgc account 2026-08-07 14:36:42 -03:00
Gabriel Fontes c76aaec68f refactor(home/productivity): make accounts opt-in 2026-08-07 14:30:49 -03:00
Gabriel Fontes ec52586ed2 fix(home/todoman): fallback to null if no todo supporting calendar present 2026-08-07 11:35:34 -03:00
Gabriel Fontes 97ec061da1 feat(home/mail): don't gpg sign by default, remove gpg key from signature 2026-08-07 11:27:15 -03:00
Gabriel Fontes c6d8944b03 chore(home): get rid of syncthing 2026-08-07 11:26:26 -03:00
Gabriel Fontes 2743828f22 chore(home/waybar): remove unused modules 2026-08-07 11:25:26 -03:00
Gabriel Fontes 16b2eb0241 feat(home/waybar): improve ubuntu logo 2026-08-07 11:22:39 -03:00
Gabriel Fontes bc0eabb66c fix(home/hyprland/hypridle): add floor to brightness
Required for intel panels, as their 0 is truly 0
2026-08-07 11:14:43 -03:00
Gabriel Fontes 5091348ab9 feat(hosts/mgc): install wireguard-tools
Used for systemctl enable wg-quick@wg0
2026-08-07 07:54:03 -03:00
Gabriel Fontes 1bfb3c687d fix(jagex-auth): use wrapped package name 2026-08-07 02:22:19 -03:00
Gabriel Fontes 400bc2021b fix(home/ai): gate runelite-mcp behind runelite package 2026-08-07 02:16:30 -03:00
Gabriel Fontes 52c180d4ae feat(home/pi): bump opus and sonnet to 5 2026-08-07 02:12:34 -03:00
Gabriel Fontes 18e1db5b05 chore(hosts/sm): disable hydra autoupgrade for now 2026-08-07 01:55:39 -03:00
Gabriel Fontes e41292b51d feat(home/mgc): add basic mgc clis 2026-08-07 01:54:26 -03:00
Gabriel Fontes d42a4fb8a2 fix(home): get rid of signing by default 2026-08-07 01:43:07 -03:00
Gabriel Fontes 3ad46d1523 refactor(system-manager): extract unix_chkpwd wrapper into a module
The setuid /run/wrappers/bin/unix_chkpwd wrapper is generic plumbing that
nixpkgs' pam_unix requires (system-manager, unlike NixOS, doesn't provide
it), not host policy. Move it to modules/system-manager/unix-chkpwd.nix,
applied unconditionally like NixOS does; hosts/.../pam.nix keeps only the
pam.d stacks.

Assisted-by: pi (claude-opus-4-8)
2026-08-07 01:14:11 -03:00
Gabriel Fontes 7aac214925 refactor(system-manager): add nix.registry module, use it in nix.nix
Port nixpkgs' nix.registry option (config/nix-flakes.nix) into
modules/system-manager/nix-registry.nix, giving system-manager the same
interface NixOS has. common/global/nix.nix now just sets
'nix.registry = mapAttrs (_: flake: {inherit flake;}) flakeInputs' like
the NixOS side, instead of hand-writing /etc/nix/registry.json.

Assisted-by: pi (claude-opus-4-8)
2026-08-07 01:13:56 -03:00
Gabriel Fontes a4e5e7dedb fix(system-manager): put flake inputs (incl. self) on the nix registry
system-manager's nix module has no nix.registry option (NixOS does), so
generate /etc/nix/registry.json directly, mirroring nixpkgs' generator.
The hydra auto-upgrade's 'nix flake metadata self' needs 'self' resolvable
from the system registry; this also registers the other inputs (nixpkgs,
etc.) for ad-hoc use, matching the NixOS side.

Assisted-by: pi (claude-opus-4-8)
2026-08-07 00:56:31 -03:00
Gabriel Fontes a186eb89e5 feat(home/mgc): use another wallpaper 2026-08-07 00:44:08 -03:00
Gabriel Fontes fb3a0b6c92 fix(runelite-mcp): pin RuneLite to 1.12.35, regen deps lockfile
build.gradle used 'latest.release', a dynamic version, so the Gradle
deps lockfile captured an ephemeral net.runelite snapshot
(client 1.12.34-20260721…-SNAPSHOT). repo.runelite.net prunes old
snapshots, so fetchDeps 404'd on re-fetch. Pin to the current concrete
release (1.12.35) and regenerate deps.json — releases aren't pruned, so
the FOD stays reproducible.

Assisted-by: pi (claude-opus-4-8)
2026-08-07 00:38:40 -03:00
Gabriel Fontes d54bb50ceb feat(taygeta): switch to a violet-magenta wallpaper
Its old nebula-cyan-yellow (seed #0a2a4a, blue 210) clashed with
merope's towers-ice (blue 213). Switch to samurai-cyberpunk-pink-green
(seed #a63ee1), a vivid violet-magenta that fills the empty ~280 gap and
sits clear of every other home's seed color.
2026-08-07 00:30:28 -03:00
Gabriel Fontes 40a57ba37b feat(mgc): give mgc its own teal wallpaper
Stop reusing maia's deer-lunar-fantasy; switch to
cubist-crystal-brown-teal (seed #1acdaf), a vivid teal that fills the
empty teal/cyan gap and is distinct from every other home's seed color.
2026-08-07 00:28:00 -03:00
Gabriel Fontes 45ce0e8031 feat(mgc/install): set up Tailscale apt repo + install during bootstrap
hydra.m7.rs is tailnet-gated (write-enabled, so locked down), so mgc needs
Tailscale to reach it for the hosts.mgc auto-upgrade. Add Tailscale's
official apt repo + signing key and install it in the Ubuntu-prereqs
stage, keeping it apt-managed (updates via apt, up on boot, independent of
the nix config). Joining the tailnet (tailscale up) stays a manual step.

Assisted-by: pi (claude-opus-4-8)
2026-08-07 00:19:16 -03:00
Gabriel Fontes e4d9acfc1f refactor(flake): drop the system-manager app; bootstrap via config scripts
The CLI now ships on the system PATH (environment.systemPackages), so the
apps.system-manager passthrough is redundant. install.sh's bootstrap (the
one caller) instead builds the systemConfig and runs its own
bin/register-profile + bin/activate, needing no flake app.

Assisted-by: pi (claude-opus-4-8)
2026-08-07 00:06:58 -03:00
Gabriel Fontes 2a362b3913 feat(system-manager/mgc): enable hydra auto-upgrade
Mirror hosts/nixos/common/global/auto-upgrade.nix for the system-manager
side: enable system.hydraAutoUpgrade against hydra.m7.rs (foundry/main),
job hosts.mgc. Disable the timer when the flake is dirty.

Assisted-by: pi (claude-opus-4-8)
2026-08-07 00:05:08 -03:00
Gabriel Fontes 5bd536014a feat(hydra): build systemConfigs as hosts jobs
Fold outputs.systemConfigs into the hydra 'hosts' jobs alongside
nixosConfigurations, so Hydra builds mgc's system-manager generation as
hosts.mgc (matching the hosts.<name> convention the auto-upgrade uses).

Assisted-by: pi (claude-opus-4-8)
2026-08-07 00:03:04 -03:00
Gabriel Fontes b3d166215c feat(system-manager): hydra-based auto-upgrade module
Port modules/nixos/hydra-auto-upgrade.nix to the system-manager side as
modules/system-manager/hydra-auto-upgrade.nix, exposed via a new
outputs.systemManagerModules and imported by the common/global base.

The script (cached-system-manager) mirrors cached-nixos-rebuild, adapted
to system-manager's model: there is no /run/current-system active pointer
and no boot-time reactivation, so the registered profile
(/nix/var/nix/profiles/system-manager-profiles/system-manager) is the
single source of truth. Only 'diff' and 'switch' actions; switch does
register-profile + activate (the CLI's switch = both, atomically).

Not enabled anywhere yet.

Assisted-by: pi (claude-opus-4-8)
2026-08-06 23:57:08 -03:00
Gabriel Fontes 99373cf795 fix(system-manager): don't kill greetd session on every switch
greetd had Requires=userborn.service, but System Manager restarts the
oneshot userborn.service on every activation. The Requires propagates
that restart to greetd, which tears down the running Wayland session
(then Restart=always bounces it back to the greeter) on every switch.

Relax to Wants=userborn.service, keeping After= for ordering: userborn
still runs before greetd at boot, but its per-activation restart no
longer drags greetd (and the live session) down. X-RestartIfChanged=false
already prevented greetd's own restart; this closes the dependency path.

Assisted-by: pi (claude-opus-4-8)
2026-08-06 23:31:10 -03:00
Gabriel Fontes a4161de3bb feat(system-manager): add system-manager CLI to environment.systemPackages
Put the CLI on the system PATH (/run/system-manager/sw/bin), like
nixos-rebuild is on NixOS, instead of 'nix run .#system-manager'. Pinned
to the flake's system-manager input, matching what builds the host.

Assisted-by: pi (claude-opus-4-8)
2026-08-06 23:31:10 -03:00
Gabriel Fontes 8e9a95a71b refactor(system-manager): split PAM out of greetd, dedup auth, trim nix.nix
Move the unix_chkpwd security wrapper and the greetd/hyprlock pam.d
stacks out of greetd.nix into a dedicated pam.nix (greetd.nix keeps just
the greeter service/user/session-wrapper). Factor the shared auth block
into one binding. The generated pam.d/* and the wrapper are byte-identical
before and after.

Also drop two no-op nix.settings: build-users-group (already Nix's
default 'nixbld') and the @wheel trusted-user (Ubuntu has no wheel group).

Assisted-by: pi (claude-opus-4-8)
2026-08-06 21:19:09 -03:00
Gabriel Fontes 22d391716e fix(system-manager): self-contained hyprlock PAM auth stack
hyprlock's pam.d did 'include login' too, which nix's linux-pam can't
parse (Debian @include). Give it a minimal self-contained auth stack on
nix's pam_unix, matching greetd. hyprlock runs unprivileged, so pam_unix
verifies via the setuid /run/wrappers/bin/unix_chkpwd added alongside the
greetd fix.

Assisted-by: pi (claude-opus-4-8)
2026-08-06 19:47:01 -03:00
Gabriel Fontes 8b0bdcbd8a fix(system-manager): self-contained greetd PAM stack + unix_chkpwd wrapper
Our pam.d/greetd did 'include login', chaining into Ubuntu's
/etc/pam.d/{login,common-*}, which is built on Debian's @include
extension. greetd links nix's linux-pam, whose config parser only knows
'include'/'substack' (no @include), so it errored 'illegal module type:
@include' and greetd never authenticated on tty1.

nix's libpam also can't dlopen Ubuntu's modules (pamtester reports
'Module is unknown'), so the stack uses nix's own modules by absolute
path, mirroring Ubuntu's expanded common-auth/account/session: pam_unix
for auth/account/session, pam_loginuid/pam_env, and nix pam_systemd to
register the logind session (XDG_RUNTIME_DIR, seat) the Wayland session
needs.

nixpkgs' pam_unix execs its verification helper from the fixed path
/run/wrappers/bin/unix_chkpwd; without it, pam_unix auth silently fails
even though the store binary works. Add a setuid unix_chkpwd security
wrapper (as NixOS does), which fixes pam_unix for both root callers
(greetd) and unprivileged ones (hyprlock).

Assisted-by: pi (claude-opus-4-8)
2026-08-06 19:47:01 -03:00
Gabriel Fontes 7442f58ac4 fix(system-manager): move greetd session-wrapper to a script
greetd 0.10's command tokenizer rejects the POSIX '\'' quoting that
lib.escapeShellArgs emits for the inline `bash --login -c 'exec "$@"' --`
session-wrapper argument, failing at config parse time with
'configuration error: illegal character'. greetd then crash-loops and
tty1 stays blank (login only worked from another tty).

Move the wrapper into a writeScript with a `bash --login` shebang and
pass its path to --session-wrapper. Same semantics (session runs in a
login shell so /etc/profile is sourced), but the command string no
longer contains nested shell quoting greetd can't parse.

Assisted-by: pi (claude-opus-4-8)
2026-08-06 17:23:03 -03:00
Gabriel Fontes 76bbb1905b feat(home/mgc): source POSIX profile.d env in fish via babelfish
System Manager and the upstream Nix installer only ship POSIX
/etc/profile.d fragments to set PATH/XDG_DATA_DIRS (SM fish support is an
unfinished upstream TODO), so a bare fish shell misses /run/wrappers/bin,
/run/system-manager/sw/bin, the nix default profile, and
/run/system-manager/sw/share. Translate the two relevant fragments with
babelfish and source them; guard on the SM bin dir so it is a no-op when
the env was already inherited (e.g. the bash-wrapped graphical session).

Assisted-by: pi (claude-opus-4-8)
2026-08-06 17:21:40 -03:00
Gabriel Fontes f6c0af14f4 fix(system-manager): replaceExisting on greetd/hyprlock pam files
A prior System Manager activation can leave our /etc/pam.d/{greetd,hyprlock}
symlinks on disk without recording them in its etc-files state, so a
re-activation sees them as unmanaged and aborts. Set replaceExisting so it
backs the stale file up to <path>.system-manager-backup and relinks instead.

Scoped to the two files we declare: Ubuntu ships no greetd/hyprlock, and
System Manager's own generated entries (nix.conf already carries upstream
replaceExisting; profile.d, environment.d) don't need our intervention.

Assisted-by: pi (claude-opus-4-8)
2026-08-06 17:21:40 -03:00
Gabriel Fontes 1ff1558a05 feat(home/mgc): declare eDP-1 monitor
1920x1080@60 with 1.25 scaling, matching the declarative monitor setup used by
the other homes.

Assisted-by: pi (gpt-5.6-sol)
2026-08-06 16:18:28 -03:00
Gabriel Fontes 7c0515a20a fix(mgc): set user manager XDG_DATA_DIRS for portals
The environment.d approach set XDG_DATA_DIRS in the user manager environment
(visible in show-environment) but not in time to affect its unit search path,
which systemd fixes when `systemd --user` is exec'd -- so home-manager's
xdg-desktop-portal units under share/systemd/user still were not found. Set it
on the user@.service process instead via an /etc drop-in, which does reach the
search path (and its user D-Bus and services), and drop the now-redundant
environment.d file. Takes effect on next login.

Assisted-by: pi (gpt-5.6-sol)
2026-08-06 16:13:08 -03:00
Gabriel Fontes 7d9ca4e9ff fix(home/mgc): expose nix profile to systemd --user
Ubuntu's logind starts the systemd user manager (and user D-Bus) without the
nix profiles in XDG_DATA_DIRS, so package-shipped units like the
xdg-desktop-portal services under share/systemd/user are never discovered.
targets.genericLinux only exports XDG_DATA_DIRS to login shells, too late for
the user manager. Set it through environment.d, which systemd reads at manager
start. Takes effect on next login.

Assisted-by: pi (gpt-5.6-sol)
2026-08-06 15:56:55 -03:00
Gabriel Fontes 04130f45dd fix(home/mgc): disable productivity feature 2026-08-06 15:49:53 -03:00
Gabriel Fontes b6aba33362 fix(home/pi): harden npm-deps integrity fetch
Download each integrity tarball to a file with --fail, connect/max timeouts,
and retries instead of piping curl straight into openssl. A stalled connection
now times out and retries rather than hanging the FOD build forever, and a
failed fetch aborts instead of yielding an empty digest. Output is unchanged,
so npmDepsHash values stay the same.

Assisted-by: pi (gpt-5.6-sol)
2026-08-06 15:47:45 -03:00
Gabriel Fontes bc96ef68ad fix(home/pi): correct pi-mcp-adapter npm-deps hash
pi-mcp-adapter does have integrity-less deps, so its FOD content changed with
the real-integrity fix. The old output was reused from the store (FOD paths
derive from name+hash), masking the mismatch on hosts with a warm cache; a
clean build (e.g. mgc) failed. Update to the deterministic hash.

Assisted-by: pi (gpt-5.6-sol)
2026-08-06 15:37:43 -03:00
Gabriel Fontes 66a6db18f0 fix(home/pi): make npm-deps FODs deterministic
Pi ships some registry deps without a lockfile integrity field (pi#5653). The
old workaround backfilled every one with a single shared fake sha512, so all of
them collided on one npm cache content address and a parallel fetch race decided
which tarball won -- making pi-claude-bridge-npm-deps non-deterministic (and
serving the wrong tarball for the losers).

Instead fetch each dep's real registry integrity inside the FOD, where network
is available and prefetch-npm-deps verifies every tarball, so the output is
stable. The main build (no network) reuses the FOD's patched lockfile. Compose
with any package-specific prePatch so vendored-lockfile packages keep working.

Only pi-claude-bridge was affected; its npmDepsHash is updated. pi-mcp-adapter,
pi-btw, and rpiv-ask-user-question have complete lockfiles and are unchanged.

Assisted-by: pi (gpt-5.6-sol)
2026-08-06 15:01:28 -03:00
Gabriel Fontes d9d7e86b8f chore(mgc): add SOPS host recipient
Add the rebuilt mgc SSH host recipient, rekey shared host secrets, and let SOPS activation validate decryption rather than grepping age metadata.

Assisted-by: pi (gpt-5.6-sol)
2026-08-06 13:20:46 -03:00
Gabriel Fontes e238ee438f chore(readme): remove mgc installation notes
Assisted-by: pi (gpt-5.6-sol)
2026-08-06 13:09:54 -03:00
Gabriel Fontes 206f8269ee refactor(mgc): require an existing Foundry checkout
Drop automatic Jujutsu cloning from the bootstrap and allow an existing checkout to be selected with FOUNDRY_DIR.

Assisted-by: pi (gpt-5.6-sol)
2026-08-06 13:08:44 -03:00
Gabriel Fontes ce2c1d89cb fix(mgc): use upstream Nix installer
Replace the Determinate installer with NixOS's official multi-user installer and reject existing Determinate installations instead of silently adopting them.

Assisted-by: pi (gpt-5.6-sol)
2026-08-06 12:54:26 -03:00
Gabriel Fontes 0f1c528887 fix(mgc): keep wpa_supplicant networking
Keep Ubuntu's networkd/wpa_supplicant stack, install wpa_gui through Home Manager, and grant gabriel access through the netdev group.

Assisted-by: pi (gpt-5.6-sol)
2026-08-06 12:43:46 -03:00