2023-12-16 13:35:37 -07:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2023-12-30 22:42:43 -07:00
|
|
|
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'
|
2023-12-16 13:35:37 -07:00
|
|
|
done
|