added short deploy script, to deploy it to my local rsppi2
This commit is contained in:
20
deploy.nu
Executable file
20
deploy.nu
Executable 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)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user