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