nix/home/zsh/desktop-laptop.sh
2024-07-04 12:57:40 +02:00

13 lines
282 B
Bash
Executable file

#!/bin/bash
hostname=$(hostname)
if [[ $hostname == *"desktop"* ]]; then
sudo nixos-rebuild switch --flake ~/nix/#desktop
elif [[ $hostname == *"laptop"* ]]; then
sudo nixos-rebuild switch --flake ~/nix/#laptop
else
echo "Unable to determine the type of machine."
fi