mirror of
https://github.com/tomasriveral/nixos.git
synced 2026-08-12 02:28:37 +02:00
Auto: cleanup-2026-05-18T16-56-07Z
This commit is contained in:
@@ -1,7 +1,4 @@
|
||||
{
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{pkgs, ...}:
|
||||
pkgs.writeShellApplication {
|
||||
name = "custom-autoupdate";
|
||||
|
||||
@@ -30,7 +27,7 @@ pkgs.writeShellApplication {
|
||||
nix flake update --flake "$FLAKE_DIR"
|
||||
|
||||
if sudo /run/current-system/sw/bin/nixos-rebuild switch --flake "$FLAKE" 2> "$ERROR_FILE"; then # use /run/.../bin/ uses the sudoless rule
|
||||
|
||||
|
||||
if ! git -C "$FLAKE_DIR" diff --quiet -- flake.lock; then
|
||||
git -C "$FLAKE_DIR" add flake.lock
|
||||
git -C "$FLAKE_DIR" commit -m "flake.lock: autoupdate-$TIME"
|
||||
@@ -57,7 +54,7 @@ pkgs.writeShellApplication {
|
||||
|
||||
git -C "$FLAKE_DIR" reset --hard "pre-autoupdate-$TIME"
|
||||
fi
|
||||
|
||||
|
||||
rm -f "$ERROR_FILE"
|
||||
'';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user