deploy
script in shell
This commit is contained in:
parent
3008a49eee
commit
477bef81a5
4 changed files with 34 additions and 0 deletions
10
packages/deploy/default.nix
Normal file
10
packages/deploy/default.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
nixos-rebuild,
|
||||
writeShellApplication,
|
||||
...
|
||||
}:
|
||||
writeShellApplication {
|
||||
name = "deploy";
|
||||
text = builtins.readFile ./deploy.sh;
|
||||
runtimeInputs = [nixos-rebuild];
|
||||
}
|
6
packages/deploy/deploy.sh
Normal file
6
packages/deploy/deploy.sh
Normal file
|
@ -0,0 +1,6 @@
|
|||
host=${1-mothership}
|
||||
|
||||
nixos-rebuild switch \
|
||||
--flake ".#${host}" \
|
||||
--target-host "root@${host}.fleet" \
|
||||
"${@:2}"
|
Loading…
Add table
Add a link
Reference in a new issue