From 6b8789d56664aa696d3e047e664121075409d22e Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Sat, 16 Dec 2023 13:35:37 -0700 Subject: [PATCH] [NixOS] Add script to expire home manager generations --- nixos/expire-home-manager-generations.sh | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100755 nixos/expire-home-manager-generations.sh diff --git a/nixos/expire-home-manager-generations.sh b/nixos/expire-home-manager-generations.sh new file mode 100755 index 00000000..a0a65561 --- /dev/null +++ b/nixos/expire-home-manager-generations.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +users=("root" "imalison" "kat" "dean" "alex" "will" "mike") + +for user in "${users[@]}"; do + sudo su - $user -c 'home-manager expire-generations -15days' +done