From 376b6bc1cf61c8b8888c62e9511137571bd2f227 Mon Sep 17 00:00:00 2001 From: Aleksandr Lebedev Date: Wed, 18 Dec 2024 11:42:28 +0100 Subject: [PATCH] small improvements to auto update script --- flake.lock | 84 +++++++++---------- .../autoupgrade/nixos-upgrade-script.sh | 6 +- 2 files changed, 45 insertions(+), 45 deletions(-) diff --git a/flake.lock b/flake.lock index 01e2489..f8a1c2c 100644 --- a/flake.lock +++ b/flake.lock @@ -40,11 +40,11 @@ ] }, "locked": { - "lastModified": 1731959031, - "narHash": "sha256-TGcvIjftziC1CjuiHCzrYDwmOoSFYIhdiKmLetzB5L0=", + "lastModified": 1734400729, + "narHash": "sha256-Bf+oya0BuleVXYGIWsb0eWnrK6s0aiesOsI7Mpj1pMU=", "owner": "hyprwm", "repo": "aquamarine", - "rev": "4468981c1c50999f315baa1508f0e53c4ee70c52", + "rev": "a132fa41be7ebe797ad758e84d9df068151a723b", "type": "github" }, "original": { @@ -395,11 +395,11 @@ ] }, "locked": { - "lastModified": 1734093295, - "narHash": "sha256-hSwgGpcZtdDsk1dnzA0xj5cNaHgN9A99hRF/mxMtwS4=", + "lastModified": 1734344598, + "narHash": "sha256-wNX3hsScqDdqKWOO87wETUEi7a/QlPVgpC/Lh5rFOuA=", "owner": "nix-community", "repo": "home-manager", - "rev": "66c5d8b62818ec4c1edb3e941f55ef78df8141a8", + "rev": "83ecd50915a09dca928971139d3a102377a8d242", "type": "github" }, "original": { @@ -466,11 +466,11 @@ ] }, "locked": { - "lastModified": 1728669738, - "narHash": "sha256-EDNAU9AYcx8OupUzbTbWE1d3HYdeG0wO6Msg3iL1muk=", + "lastModified": 1734364709, + "narHash": "sha256-+2bZJL2u5hva7rSp65OfKJBK+k03T6GB/NCvpoS1OOo=", "owner": "hyprwm", "repo": "hyprcursor", - "rev": "0264e698149fcb857a66a53018157b41f8d97bb0", + "rev": "f388aacd22be4a6e4d634fbaf6f75eb0713d239a", "type": "github" }, "original": { @@ -495,11 +495,11 @@ ] }, "locked": { - "lastModified": 1733248371, - "narHash": "sha256-FFLJzFTyNhS7tBEEECx0B8Ye/bpmxhFVEKlECgMLc6c=", + "lastModified": 1733684019, + "narHash": "sha256-2kYREgmSmbLsmDpLEq96hxVAU3qz8aCvVhF65yCFZHY=", "owner": "hyprwm", "repo": "hyprgraphics", - "rev": "cc95e5babc6065bc3ab4cd195429a9900836ef13", + "rev": "fb2c0268645a77403af3b8a4ce8fa7ba5917f15d", "type": "github" }, "original": { @@ -524,11 +524,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1734219437, - "narHash": "sha256-NVQIAvfSpBSJaJ4BP1cE1yVGjCuvXs0NN1G1t+f52Ss=", + "lastModified": 1734456362, + "narHash": "sha256-eb+OcQaSp7pcJxNe6wi52AiqLle820aD4Ejq10wmsjo=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "db249648776875ce3142141d0d3055e43ce606aa", + "rev": "5f1df55fcb45a72e92258113685aa9064f6ebf3e", "type": "github" }, "original": { @@ -578,11 +578,11 @@ ] }, "locked": { - "lastModified": 1733472316, - "narHash": "sha256-PvXiFLIExJEJj+goLbIuXLTN5CSDSAUsAfiYSdbbWg0=", + "lastModified": 1733940128, + "narHash": "sha256-hmfXWj2GA9cj1QUkPFYtAAeohhs615zL4E3APy3FnvQ=", "owner": "hyprwm", "repo": "hyprland-qtutils", - "rev": "969427419276c7ee170301ef1ebe0f68eb6eb2e2", + "rev": "3833097e50473a152dd614d4b468886840b4ea78", "type": "github" }, "original": { @@ -607,11 +607,11 @@ ] }, "locked": { - "lastModified": 1728168612, - "narHash": "sha256-AnB1KfiXINmuiW7BALYrKqcjCnsLZPifhb/7BsfPbns=", + "lastModified": 1734364628, + "narHash": "sha256-ii8fzJfI953n/EmIxVvq64ZAwhvwuuPHWfGd61/mJG8=", "owner": "hyprwm", "repo": "hyprlang", - "rev": "f054f2e44d6a0b74607a6bc0f52dba337a3db38e", + "rev": "16e59c1eb13d9fb6de066f54e7555eb5e8a4aba5", "type": "github" }, "original": { @@ -632,11 +632,11 @@ ] }, "locked": { - "lastModified": 1732288281, - "narHash": "sha256-XTU9B53IjGeJiJ7LstOhuxcRjCOFkQFl01H78sT9Lg4=", + "lastModified": 1734384247, + "narHash": "sha256-bl3YyJb2CgaeVKYq/l8j27vKdbkTpDNFDsnCl0dnNlY=", "owner": "hyprwm", "repo": "hyprutils", - "rev": "b26f33cc1c8a7fd5076e19e2cce3f062dca6351c", + "rev": "e6cf45cd1845368702e03b8912f4cc44ebba3322", "type": "github" }, "original": { @@ -657,11 +657,11 @@ ] }, "locked": { - "lastModified": 1726874836, - "narHash": "sha256-VKR0sf0PSNCB0wPHVKSAn41mCNVCnegWmgkrneKDhHM=", + "lastModified": 1734384417, + "narHash": "sha256-noYeXcNQ15g1/gIJIYT2zdO66wzY5Z06PYz6BfKUZA8=", "owner": "hyprwm", "repo": "hyprwayland-scanner", - "rev": "500c81a9e1a76760371049a8d99e008ea77aa59e", + "rev": "90e87f7fcfcce4862826d60332cbc5e2f87e1f88", "type": "github" }, "original": { @@ -736,11 +736,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1731139594, - "narHash": "sha256-IigrKK3vYRpUu+HEjPL/phrfh7Ox881er1UEsZvw9Q4=", + "lastModified": 1733212471, + "narHash": "sha256-M1+uCoV5igihRfcUKrr1riygbe73/dzNnzPsmaLCmpo=", "owner": "nixos", "repo": "nixpkgs", - "rev": "76612b17c0ce71689921ca12d9ffdc9c23ce40b2", + "rev": "55d15ad12a74eb7d4646254e13638ad0c4128776", "type": "github" }, "original": { @@ -768,11 +768,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1733392399, - "narHash": "sha256-kEsTJTUQfQFIJOcLYFt/RvNxIK653ZkTBIs4DG+cBns=", + "lastModified": 1734119587, + "narHash": "sha256-AKU6qqskl0yf2+JdRdD0cfxX4b9x3KKV5RqA6wijmPM=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "d0797a04b81caeae77bcff10a9dde78bc17f5661", + "rev": "3566ab7246670a43abd2ffa913cc62dad9cdf7d5", "type": "github" }, "original": { @@ -845,11 +845,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1734293246, - "narHash": "sha256-JNHYMdWwuX3J/VHCFUNJ8ZhKPdgAvWF9jPa6u72Pvec=", + "lastModified": 1734472356, + "narHash": "sha256-RIoG3zXarfuHfzM/z/NPjoHHxl3sqYrtEatSLA1/bIk=", "owner": "nix-community", "repo": "nixvim", - "rev": "85b990286d391cce9a41d72cf4303637a7b43a10", + "rev": "4f1fe403b18c45614d6b81423038a34cff371244", "type": "github" }, "original": { @@ -892,11 +892,11 @@ "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1733318908, - "narHash": "sha256-SVQVsbafSM1dJ4fpgyBqLZ+Lft+jcQuMtEL3lQWx2Sk=", + "lastModified": 1734379367, + "narHash": "sha256-Keu8z5VgT5gnCF4pmB+g7XZFftHpfl4qOn7nqBcywdE=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "6f4e2a2112050951a314d2733a994fbab94864c6", + "rev": "0bb4be58f21ff38fc3cdbd6c778eb67db97f0b99", "type": "github" }, "original": { @@ -1126,11 +1126,11 @@ ] }, "locked": { - "lastModified": 1733157064, - "narHash": "sha256-NetqJHAN4bbZDQADvpep+wXk2AbMZ2bN6tINz8Kpz6M=", + "lastModified": 1734422917, + "narHash": "sha256-0y7DRaXslhfqVKV8a/talYTYAe2NHOQhMZG7KMNRCtc=", "owner": "hyprwm", "repo": "xdg-desktop-portal-hyprland", - "rev": "fd85ef39369f95eed67fdf3f025e86916edeea2f", + "rev": "3e884d941ca819c1f2e50df8bdae0debded1ed87", "type": "github" }, "original": { diff --git a/nixos/modules/services/autoupgrade/nixos-upgrade-script.sh b/nixos/modules/services/autoupgrade/nixos-upgrade-script.sh index 1447d6c..caf4e84 100755 --- a/nixos/modules/services/autoupgrade/nixos-upgrade-script.sh +++ b/nixos/modules/services/autoupgrade/nixos-upgrade-script.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/bin/sh # Wrapper script for nixos-rebuild # Configuration parameters @@ -73,11 +73,11 @@ fi cd $flakeDir echo "Pulling the latest version of the repository..." -/run/wrappers/bin/sudo -u $user git pull +/run/wrappers/bin/sudo -u $user /run/current-system/sw/bin/git pull if [ $update = true ]; then echo "Updating flake.lock..." - /run/wrappers/bin/sudo -u $user nix flake update --commit-lock-file && /run/wrappers/bin/sudo -u $user git push + /run/wrappers/bin/sudo -u $user /run/current-system/sw/bin/nix flake update --commit-lock-file && /run/wrappers/bin/sudo -u $user /run/current-system/sw/bin/git push else echo "Skipping 'nix flake update'..." fi