update readme
This commit is contained in:
parent
96fa4e6854
commit
abe1adba49
2 changed files with 7 additions and 6 deletions
|
@ -4,8 +4,6 @@ Use at your own risk.
|
||||||
|
|
||||||
## Deploying
|
## Deploying
|
||||||
|
|
||||||
The `./deploy` script generates a NixOS configuration that pins the current git `HEAD` of this project and copies the resulting `configuration.nix` to the destionation host. Then it tests the new confiurations and rolls back if it fails.
|
```
|
||||||
|
nix run .#deploy $TARGET_HOST
|
||||||
## TODO
|
```
|
||||||
|
|
||||||
- Use `nix-copy-closure`?
|
|
||||||
|
|
|
@ -17,7 +17,10 @@
|
||||||
{
|
{
|
||||||
apps.deploy = {
|
apps.deploy = {
|
||||||
type = "app";
|
type = "app";
|
||||||
program = "${selfPkgs.deploy}/bin/deploy";
|
program = toString (pkgs.writeScript "deploy" ''
|
||||||
|
#!${pkgs.runtimeShell}
|
||||||
|
nixos-rebuild switch --upgrade --flake ".#$1" --target-host "$1.dadada.li" --build-host localhost --use-remote-sudo
|
||||||
|
'');
|
||||||
};
|
};
|
||||||
apps.hm-switch = {
|
apps.hm-switch = {
|
||||||
type = "app";
|
type = "app";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue