From 8212853402455cce833ae619a8171ff2cb01d17b Mon Sep 17 00:00:00 2001 From: ediblerope Date: Thu, 4 Dec 2025 12:34:23 +0000 Subject: [PATCH] Update common.nix --- common.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common.nix b/common.nix index 2dd6c91..70339ba 100644 --- a/common.nix +++ b/common.nix @@ -27,7 +27,8 @@ networking.networkmanager.enable = true; # Shell aliases environment.shellAliases = { update = '' - if ! nix-channel --list | grep -q "nixos.*nixos-unstable"; then + CHANNEL=$(sudo nix-channel --list | grep "^nixos " | awk '{print $2}') + if [[ "$CHANNEL" != *"nixos-unstable"* ]]; then echo "Switching to nixos-unstable channel..." sudo nix-channel --add https://nixos.org/channels/nixos-unstable nixos sudo nix-channel --update