added short deploy script, to deploy it to my local rsppi2

This commit is contained in:
2025-11-26 22:02:08 +01:00
parent 7f31369e78
commit 98aa4691a3
6 changed files with 44 additions and 1 deletions

20
deploy.nu Executable file
View File

@@ -0,0 +1,20 @@
#!/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)
}
}