pull-update: use writeShellApplication instead
This commit is contained in:
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user