1
0
Fork 0

Update flake.lock

This commit is contained in:
Aires 2024-05-30 12:46:43 -04:00
parent 9342ab263a
commit 3a044e901a
2 changed files with 9 additions and 6 deletions

View file

@ -120,7 +120,7 @@ in
Type = "oneshot"; Type = "oneshot";
User = config.users.users.aires.name; User = config.users.users.aires.name;
}; };
path = with pkgs; [ path = with pkgs; [ # Courtesy of https://discourse.nixos.org/t/how-to-use-other-packages-binary-in-systemd-service-configuration/14363
coreutils coreutils
gnutar gnutar
xz.bin xz.bin
@ -135,8 +135,7 @@ in
git pull --recurse-submodules git pull --recurse-submodules
nix flake update nix flake update
git add flake.lock git add flake.lock
git commit -m "Update flake.lock" git diff --quiet && git diff --staged --quiet || git commit -am "Update flake.lock" && git push # Courtesy of https://stackoverflow.com/a/40255467
git push
''; '';
}; };

View file

@ -43,10 +43,14 @@
openssh openssh
]; ];
script = '' script = ''
set -eu
cd ${config.users.users.aires.home}/Development/nix-configuration cd ${config.users.users.aires.home}/Development/nix-configuration
sudo -u aires git pull --recurse-submodules # Check if there are changes from Git
nh os switch sudo -u aires git fetch
sudo -u aires git diff --exit-code main origin/main
if [ $? -eq 1]; then
sudo -u aires git pull --recurse-submodules
nh os search
fi
''; '';
}; };
systemd.timers."nixos-update-timer" = { systemd.timers."nixos-update-timer" = {