Nix : Update on reboot.
This commit is contained in:
parent
6073a95871
commit
fcb8d67acb
|
@ -47,14 +47,14 @@ function nix_update() {
|
||||||
nixos-rebuild switch -I nixos-config=/root/.config/linux/system/${target}/Configuration.nix
|
nixos-rebuild switch -I nixos-config=/root/.config/linux/system/${target}/Configuration.nix
|
||||||
}
|
}
|
||||||
|
|
||||||
# Upgrade system.
|
# Upgrade system. Applies after reboot.
|
||||||
# Optionally force the hostname.
|
# Optionally force the hostname.
|
||||||
# Usage: nix_upgrade [HOSTNAME]
|
# Usage: nix_upgrade [HOSTNAME]
|
||||||
function nix_upgrade() {
|
function nix_upgrade() {
|
||||||
local target="${1}"
|
local target="${1}"
|
||||||
[[ "${target}" = "" ]] && target="${HOSTNAME}"
|
[[ "${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.
|
# Free up root space.
|
||||||
|
|
Reference in a new issue