From 437f02a2eae4867314803188894eeefed7d1c591 Mon Sep 17 00:00:00 2001 From: neeasade Date: Mon, 16 Mar 2020 12:05:38 -0400 Subject: [PATCH] system-update --- bin/bin/system-update | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 bin/bin/system-update diff --git a/bin/bin/system-update b/bin/bin/system-update new file mode 100755 index 00000000..e57317b4 --- /dev/null +++ b/bin/bin/system-update @@ -0,0 +1,15 @@ +#!/bin/sh + +usage() { + echo "$0 [test|switch]" + exit 1 +} + +sudo echo yeet >/dev/null # so we and all our subshells get it + +channel=$(sudo nix-channel --list | sed 's#https://nixos.org/channels/nixos-##') +echo "channel: $channel" + +# update our nix-channel reference: +sudo nix-channel --update +sudo nixos-rebuild "${*}"