mirror of
https://github.com/tomasriveral/nixos.git
synced 2026-08-12 02:28:37 +02:00
snapshot pre-autoupdate-2026-05-15T13-36-59Z
This commit is contained in:
@@ -30,16 +30,21 @@ pkgs.writeShellApplication {
|
|||||||
nix flake update --flake "$FLAKE_DIR"
|
nix flake update --flake "$FLAKE_DIR"
|
||||||
|
|
||||||
if sudo nixos-rebuild switch --flake "$FLAKE" 2> "$ERROR_FILE"; then
|
if sudo nixos-rebuild switch --flake "$FLAKE" 2> "$ERROR_FILE"; then
|
||||||
|
|
||||||
|
if git -C "$FLAKE_DIR" diff --quiet; then
|
||||||
|
git -C "$FLAKE_DIR" add flake.lock
|
||||||
|
git -C "$FLAKE_DIR" commit -m "flake.lock: autoupdate-$TIME"
|
||||||
|
git -C "$FLAKE_DIR" push
|
||||||
|
|
||||||
git -C "$FLAKE_DIR" add flake.lock
|
notify-send "Flake autoupdate" "Rebuild OK"
|
||||||
git -C "$FLAKE_DIR" commit -m "flake.lock: autoupdate-$TIME"
|
|
||||||
git -C "$FLAKE_DIR" push
|
|
||||||
|
|
||||||
notify-send "Flake autoupdate" "Rebuild OK"
|
matrix-commander-rs --verbose -m "Flake rebuild succesfull.<br><a href=\"https://matrix.to/#/@notificationbot_0000:matrix.org\">@notificationbot_0000</a>" \
|
||||||
|
--html \
|
||||||
matrix-commander-rs --verbose -m "Flake rebuild succesfull.<br><a href=\"https://matrix.to/#/@notificationbot_0000:matrix.org\">@notificationbot_0000</a>" \
|
-r "\!7j-78_02dHROeLj4Ns8F12eo4IiZGv4zNsQ_1-WlyIU"
|
||||||
--html \
|
else
|
||||||
-r "\!7j-78_02dHROeLj4Ns8F12eo4IiZGv4zNsQ_1-WlyIU"
|
notify-send "Flake autoupdate" "No changes"
|
||||||
|
git -C "$FLAKE_DIR" push
|
||||||
|
fi
|
||||||
|
|
||||||
else
|
else
|
||||||
ERROR_MSG=$(cat "$ERROR_FILE")
|
ERROR_MSG=$(cat "$ERROR_FILE")
|
||||||
@@ -53,7 +58,6 @@ pkgs.writeShellApplication {
|
|||||||
git -C "$FLAKE_DIR" reset --hard "pre-autoupdate-$TIME"
|
git -C "$FLAKE_DIR" reset --hard "pre-autoupdate-$TIME"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
git -C "$FLAKE_DIR" push
|
|
||||||
rm -f "$ERROR_FILE"
|
rm -f "$ERROR_FILE"
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user