NixOS-Config/pkgs/rebuild/default.nix

27 lines
527 B
Nix
Raw Normal View History

2024-02-26 14:17:34 +01:00
{
lib,
stdenv,
writeShellApplication,
}:
writeShellApplication
{
name = "rebuild";
runtimeInputs = [];
text = ''
# A rebuild script for NixOS
set -e
pushd /tmp
git clone https://git.lillianviolet.dev/Lillian-Violet/NixOS-Config.git ./rebuild
2024-02-26 14:17:34 +01:00
pushd ./rebuild
echo "NixOS Rebuilding..."
sudo nixos-rebuild switch --flake .#
2024-02-26 14:17:34 +01:00
popd
echo "Cleaning up repository in tmp..."
rm -rf ./rebuild
popd
notify-send -e "NixOS Rebuilt OK!" --icon=software-update-available
'';
}