From 2ddf7ec35bc4b4e2e60adf0a02a9624d837ac2e7 Mon Sep 17 00:00:00 2001 From: ediblerope Date: Thu, 4 Dec 2025 12:30:15 +0000 Subject: [PATCH] Update common.nix --- common.nix | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/common.nix b/common.nix index f08ba9f..2dd6c91 100644 --- a/common.nix +++ b/common.nix @@ -26,10 +26,16 @@ networking.networkmanager.enable = true; # Shell aliases environment.shellAliases = { - # NEW Flake-based command - update = "sudo nixos-rebuild switch --flake .#FredOS-Gaming"; - clean = "sudo nix-collect-garbage -d"; - ll = "ls -alh"; + update = '' + if ! nix-channel --list | grep -q "nixos.*nixos-unstable"; then + echo "Switching to nixos-unstable channel..." + sudo nix-channel --add https://nixos.org/channels/nixos-unstable nixos + sudo nix-channel --update + fi + sudo nixos-rebuild switch --upgrade --option tarball-ttl 0 + ''; + clean = "sudo nix-collect-garbage -d"; + ll = "ls -alh"; }; # Add packages