nix/home/zsh/desktop-laptop.sh

13 lines
280 B
Bash
Raw Normal View History

2024-08-05 21:03:25 +02:00
#!/bin/sh
2024-07-03 15:40:52 +02:00
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