jungle/rebuild.sh

20 lines
306 B
Bash
Raw Normal View History

2023-04-26 14:09:23 +02:00
#!/bin/sh -e
if [ "$(id -u)" != 0 ]; then
echo "Needs root permissions"
exit 1
fi
host=$(hostname)
2023-04-26 17:36:36 +02:00
#conf="$(readlink -f .)/${host}/configuration.nix"
#
#if [ ! -e "$conf" ]; then
# echo "Missing config $conf"
# exit 1
#fi
#
#NIXOS_CONFIG="${conf}" nixos-rebuild switch
2023-04-26 14:09:23 +02:00
2023-04-26 17:36:36 +02:00
nixos-rebuild switch --flake .