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";
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
gnutar
xz.bin
@ -135,8 +135,7 @@ in
git pull --recurse-submodules
nix flake update
git add flake.lock
git commit -m "Update flake.lock"
git push
git diff --quiet && git diff --staged --quiet || git commit -am "Update flake.lock" && git push # Courtesy of https://stackoverflow.com/a/40255467
'';
};

View file

@ -43,10 +43,14 @@
openssh
];
script = ''
set -eu
cd ${config.users.users.aires.home}/Development/nix-configuration
# Check if there are changes from Git
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 switch
nh os search
fi
'';
};
systemd.timers."nixos-update-timer" = {