Nix : Update on reboot.

This commit is contained in:
Dmitry Voronin 2024-01-27 18:55:01 +03:00
parent 6073a95871
commit fcb8d67acb

View file

@ -47,14 +47,14 @@ function nix_update() {
nixos-rebuild switch -I nixos-config=/root/.config/linux/system/${target}/Configuration.nix
}
# Upgrade system.
# Upgrade system. Applies after reboot.
# Optionally force the hostname.
# Usage: nix_upgrade [HOSTNAME]
function nix_upgrade() {
local target="${1}"
[[ "${target}" = "" ]] && target="${HOSTNAME}"
nixos-rebuild switch --upgrade-all -I nixos-config=/root/.config/linux/system/${target}/Configuration.nix
nixos-rebuild boot --upgrade-all -I nixos-config=/root/.config/linux/system/${target}/Configuration.nix
}
# Free up root space.