nix/modules/zsh/scripts/rebuild.sh
2024-08-31 15:09:30 +02:00

12 lines
235 B
Bash
Executable file

#!/bin/sh
hostname=$(hostname)
git add .
if [[ $hostname == *"desktop"* ]]; then
sudo nixos-rebuild switch --flake ~/nix/#desktop
elif [[ $hostname == *"laptop"* ]]; then
sudo nixos-rebuild switch --flake ~/nix/#laptop
fi