From 29e01ae75b6e22274b8025b51700ae68b59fc886 Mon Sep 17 00:00:00 2001 From: Dmitry Voronin Date: Wed, 24 Jan 2024 19:06:50 +0300 Subject: [PATCH] Nix : Add nix_upgrade. --- .config/bash/module/Nix.sh | 7 ++++++- .doc/Bash.md | 4 ++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.config/bash/module/Nix.sh b/.config/bash/module/Nix.sh index f9667da..f089b68 100644 --- a/.config/bash/module/Nix.sh +++ b/.config/bash/module/Nix.sh @@ -28,7 +28,12 @@ function nix_unstable_small() { nix-channel --add https://nixos.org/channels/nixos-unstable-small nixos } -# Update system. +# Update system (rebuild). function nix_update() { + nixos-rebuild switch +} + +# Upgrade system. +function nix_upgrade() { nixos-rebuild switch --upgrade } diff --git a/.doc/Bash.md b/.doc/Bash.md index c53ddcf..2273841 100644 --- a/.doc/Bash.md +++ b/.doc/Bash.md @@ -255,6 +255,10 @@ Command|Description Command|Description ---|--- `nix_find `|Find Nix package path. +`nix_unstable`|Switch to Unstable branch. +`nix_unstable_small`|Switch to Small Unstable branch (for server). +`nix_update`|Update system (rebuild). +`nix_upgrade`|Upgrade system. ## Notify.