Init infrastructure
Benjamin, I hate you. Signed-off-by: Ryan Lahfa <federez-infra@lahfa.xyz>
This commit is contained in:
commit
8acdce99df
23 changed files with 602 additions and 0 deletions
14
provision-anywhere.sh
Executable file
14
provision-anywhere.sh
Executable file
|
@ -0,0 +1,14 @@
|
|||
#!/usr/bin/env bash
|
||||
set -ex
|
||||
|
||||
NODE=$1
|
||||
|
||||
DISKO_SCRIPT=$(colmena eval -E "{ nodes, ... }: nodes.\"$NODE\".config.system.build.diskoScript" --show-trace | tr -d '"')
|
||||
DISKO_SCRIPT_DRV=$(colmena eval -E "{ nodes, ... }: nodes.\"$NODE\".config.system.build.diskoScript.drvPath" --show-trace | tr -d '"')
|
||||
|
||||
nix-store -r $DISKO_SCRIPT_DRV
|
||||
|
||||
NIXOS_SYSTEM=$(colmena eval -E "{ nodes, ... }: nodes.\"$NODE\".config.system.build.toplevel")
|
||||
colmena build --on "$NODE" --verbose
|
||||
echo $NIXOS_SYSTEM $DISKO_SCRIPT
|
||||
echo nix run github:nix-community/nixos-anywhere -- -s $DISKO_SCRIPT $NIXOS_SYSTEM "root@$NODE.federez.net" --no-reboot
|
Loading…
Add table
Add a link
Reference in a new issue