2022-05-24 18:44:52 +02:00
|
|
|
{ writeShellApplication }:
|
|
|
|
|
|
|
|
writeShellApplication {
|
|
|
|
name = "custom-update-system";
|
|
|
|
|
|
|
|
text = ''
|
|
|
|
nix-channel --update
|
|
|
|
home-manager switch
|
2022-11-11 14:08:42 +01:00
|
|
|
|
2023-03-07 15:44:46 +01:00
|
|
|
oldVersion=$( (home-manager generations; true) | head -n 2 | tail -n 1 | cut -d' ' -f 7)
|
|
|
|
newVersion=$( (home-manager generations; true) | head -n 1 | cut -d' ' -f 7)
|
2022-11-11 14:08:42 +01:00
|
|
|
nvd diff "$oldVersion" "$newVersion"
|
|
|
|
|
2023-02-24 11:52:43 +01:00
|
|
|
home-manager expire-generations '-12 days'
|
|
|
|
nix-env --delete-generations +3
|
2022-05-24 18:44:52 +02:00
|
|
|
nix store gc
|
|
|
|
'';
|
|
|
|
}
|