docs: document basic usage of infra-rebuild
This commit is contained in:
parent
3cdd4ba8b5
commit
9e96034997
18
README.md
18
README.md
|
@ -1,5 +1,23 @@
|
|||
# infra-rebuild
|
||||
|
||||
infra-rebuild mirrors nixos-rebuild closely in its command-line interface, but focuses on making infrastructure deployment more convenient. It is built for infrastructure defined in a flake, where each hosts configuration is represented by a different `nixosConfiguration` in the flakes output.
|
||||
|
||||
For building the configuration of e.g. two hosts called `web-01` and `git` one can simply run:
|
||||
|
||||
```
|
||||
infra-rebuild build web-01 git
|
||||
```
|
||||
|
||||
For deploying the hosts - using the switch operation - it's as simple as:
|
||||
|
||||
```
|
||||
infra-rebuild switch web-01 git
|
||||
```
|
||||
|
||||
Here infra-rebuild will simply run `nixos-rebuild switch` with the `target-host` option set for each host.
|
||||
Because infra-rebuild tries to be usable without any configuration, by default it queries the hosts FQDN from its `nixosConfiguration` and uses that for the target host.
|
||||
However to override aspects of the target host for specific or all hosts, infra-rebuild also accepts a `deployment_configuration.json` as configuration.
|
||||
|
||||
## License
|
||||
|
||||
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
||||
|
|
Loading…
Reference in a new issue