Update flake.lock
This commit is contained in:
parent
9342ab263a
commit
3a044e901a
|
@ -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
|
||||
'';
|
||||
};
|
||||
|
||||
|
|
|
@ -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" = {
|
||||
|
|
Loading…
Reference in a new issue