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