nix/home/zsh/desktop-laptop.sh

13 lines
282 B
Bash
Raw Normal View History

2024-07-03 15:40:52 +02:00
#!/bin/bash
hostname=$(hostname)
2024-07-04 12:57:40 +02:00
if [[ $hostname == *"desktop"* ]]; then
sudo nixos-rebuild switch --flake ~/nix/#desktop
2024-07-03 15:40:52 +02:00
elif [[ $hostname == *"laptop"* ]]; then
sudo nixos-rebuild switch --flake ~/nix/#laptop
else
echo "Unable to determine the type of machine."
fi