|
|
@ -3,9 +3,27 @@ def after_apply_all [] {
|
|
|
|
print $"(ansi red)home-manager is not installed(ansi reset)"
|
|
|
|
print $"(ansi red)home-manager is not installed(ansi reset)"
|
|
|
|
return
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (ha-chksum) == $env.SILO_HA_CHKSUM? {
|
|
|
|
|
|
|
|
print $"(ansi green)home-manager configuration unchanged(ansi reset)"
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
print "Updating with home-manager"
|
|
|
|
print "Updating with home-manager"
|
|
|
|
( home-manager switch )
|
|
|
|
( home-manager switch )
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
print "Expiring old home manager configurations"
|
|
|
|
|
|
|
|
( home-manager expire-generations -1 days )
|
|
|
|
|
|
|
|
|
|
|
|
print "Cleaning nix store"
|
|
|
|
print "Cleaning nix store"
|
|
|
|
( nix-store --gc )
|
|
|
|
( nix-store --gc )
|
|
|
|
|
|
|
|
|
|
|
|
ignore
|
|
|
|
ignore
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def --env before_apply_all [] {
|
|
|
|
|
|
|
|
$env.SILO_HA_CHKSUM = (ha-chksum)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def ha-chksum [] {
|
|
|
|
|
|
|
|
shasum ~/.config/home-manager/home.nix
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|