pull-update: use writeShellApplication instead

This commit is contained in:
2026-04-16 15:02:08 -04:00
parent d2d25bbdfe
commit 982cc4aebc

View File

@@ -7,17 +7,19 @@
let
deploy-url = "https://nix-cache.sigkill.computer/deploy/${hostname}";
pull-update = pkgs.writeShellScript "pull-update" ''
set -uo pipefail
export PATH=${
pkgs.lib.makeBinPath [
pull-update = pkgs.writeShellApplication {
name = "pull-update";
runtimeInputs = with pkgs; [
pkgs.curl
pkgs.coreutils
pkgs.nix
pkgs.systemd
pkgs.util-linux
]
}
];
text = ''
set -uo pipefail
# wait for actual connectivity, not just networkd "up"
for i in $(seq 1 30); do
@@ -51,6 +53,7 @@ let
sleep 10
systemctl reboot
'';
};
in
{
systemd.services.pull-update = {