Files
snooze-pal/deploy.nu

21 lines
481 B
Plaintext
Executable File

#!/usr/bin/env nu
def main [] {
main run
}
def "main run" [] {
let config = get-config
nix build $".#($config | get target_platform)"
scp result/bin/snooze-pal ($config | get target_machine):bin/snooze-pal
ssh ($config | get target_machine) "chmod +rwx bin/snooze-pal && bin/snooze-pal"
}
def get-config [] {
if ('./deploy.config.toml.secret' | path exists) {
return (sops decrypt deploy.config.toml.secret | from toml)
} else {
return (open deploy.config.toml)
}
}