Update common.nix
This commit is contained in:
parent
2ddf7ec35b
commit
8212853402
1 changed files with 2 additions and 1 deletions
|
|
@ -27,7 +27,8 @@ networking.networkmanager.enable = true;
|
||||||
# Shell aliases
|
# Shell aliases
|
||||||
environment.shellAliases = {
|
environment.shellAliases = {
|
||||||
update = ''
|
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..."
|
echo "Switching to nixos-unstable channel..."
|
||||||
sudo nix-channel --add https://nixos.org/channels/nixos-unstable nixos
|
sudo nix-channel --add https://nixos.org/channels/nixos-unstable nixos
|
||||||
sudo nix-channel --update
|
sudo nix-channel --update
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue