Use home-manager.sharedModules for shared user config

Replace manual forEachUser pattern with built-in sharedModules for
applying config to all home-manager users. Add automatic garbage
collection of old generations (weekly, older than 7 days) and remove
the now-unnecessary expire-home-manager-generations justfile recipe.

Also update codex PR patch hash (upstream patch was modified).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-31 19:48:50 -08:00
parent 317019d5bc
commit 7a1a612397
5 changed files with 9 additions and 11 deletions

View File

@@ -3,12 +3,3 @@ switch *args:
fix-local-path-issue:
nix flake update imalison-taffybar
expire-home-manager-generations:
#!/usr/bin/env bash
set -euxo pipefail
for user in $(awk -F':' '{ if ($3 >= 1000 && $7 !~ /nologin|false|sync|shutdown|halt/) print $1 }' /etc/passwd); do
echo $user
sudo su - $user -c 'home-manager expire-generations -1days'
done