34 lines
1.1 KiB
Nix
34 lines
1.1 KiB
Nix
{pkgs} @ args:
|
|
pkgs.mkShell {
|
|
buildInputs = with pkgs; [
|
|
alejandra
|
|
nh
|
|
(pkgs.writeShellScriptBin
|
|
"azos-lauretta-update"
|
|
''
|
|
# Authenticate up front and keep the sudo timestamp fresh during the
|
|
# build, so nh's activation step doesn't prompt (and time out) at the end.
|
|
sudo -v || exit 1
|
|
while true; do
|
|
sleep 60
|
|
sudo -n -v 2>/dev/null || exit
|
|
done &
|
|
keepalive=$!
|
|
trap 'kill $keepalive 2>/dev/null' EXIT
|
|
nh os switch '.?submodules=1#lauretta'
|
|
'')
|
|
(pkgs.writeShellScriptBin
|
|
"azos-update-azos-core"
|
|
"nix flake update --flake '.?submodules=1' azos-core")
|
|
(pkgs.writeShellScriptBin
|
|
"azos-update"
|
|
"nix flake update --flake '.?submodules=1'")
|
|
(pkgs.writeShellScriptBin
|
|
"azos-beacon-build-image"
|
|
"nix build '.?submodules=1#packages.x86_64-linux.beacon-image'")
|
|
(pkgs.writeShellScriptBin
|
|
"azos-beacon-remote-update"
|
|
"nixos-rebuild switch --flake '.?submodules=1#beacon' --target-host aner@192.168.1.200 --build-host aner@192.168.1.200 --sudo")
|
|
];
|
|
}
|