summaryrefslogtreecommitdiffstats
path: root/nix-script-switch.sh
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2015-07-04 16:41:23 +0200
committerMatthias Beyer <mail@beyermatthias.de>2015-07-04 16:43:23 +0200
commitb49516b1043b2190990668657aa5593cff94fc12 (patch)
treefcc8596c02b0425deeabb117c92fc99324eab408 /nix-script-switch.sh
parent4c0e2c7a0cc250bd90cb78a7ee7ddf5eb1247ea6 (diff)
Fix: switch command should use system generation helper
Diffstat (limited to 'nix-script-switch.sh')
-rwxr-xr-xnix-script-switch.sh3
1 files changed, 1 insertions, 2 deletions
diff --git a/nix-script-switch.sh b/nix-script-switch.sh
index 6cf585d..2290b33 100755
--- a/nix-script-switch.sh
+++ b/nix-script-switch.sh
@@ -90,8 +90,7 @@ REBUILD_EXIT=$?
if [[ $REBUILD_EXIT -eq 0 ]]
then
- LASTGEN=$(sudo nix-env -p /nix/var/nix/profiles/system --list-generations |\
- grep current | cut -d " " -f 2)
+ LASTGEN=$(current_system_generation)
sudo -k
if [[ -z "$TAG_NAME" ]]