13 lines
280 B
Bash
Executable file
13 lines
280 B
Bash
Executable file
#!/bin/sw
|
|
|
|
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
|
|
|