add exposed lib to usage manual
This commit is contained in:
parent
60c618e7cc
commit
f858e80817
2 changed files with 26 additions and 2 deletions
|
|
@ -1850,6 +1850,9 @@
|
||||||
"usage-example-nixosrebuild": [
|
"usage-example-nixosrebuild": [
|
||||||
"usage.html#usage-example-nixosrebuild"
|
"usage.html#usage-example-nixosrebuild"
|
||||||
],
|
],
|
||||||
|
"usage-lib": [
|
||||||
|
"usage.html#usage-lib"
|
||||||
|
],
|
||||||
"usage-flake": [
|
"usage-flake": [
|
||||||
"usage.html#usage-flake"
|
"usage.html#usage-flake"
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -75,8 +75,29 @@ the [GitHub repository][1] for Self Host Blocks updates the `nixpkgs` input ever
|
||||||
and verifies all tests pass before automatically merging the new `nixpkgs` version.
|
and verifies all tests pass before automatically merging the new `nixpkgs` version.
|
||||||
The setup is explained in [this blog post][2].
|
The setup is explained in [this blog post][2].
|
||||||
|
|
||||||
[1]: https://github.com/ibizaman/selfhostblocks
|
[repo]: https://github.com/ibizaman/selfhostblocks
|
||||||
[2]: https://blog.tiserbox.com/posts/2023-12-25-automated-flake-lock-update-pull-requests-and-merging.html
|
[automerge]: https://blog.tiserbox.com/posts/2023-12-25-automated-flake-lock-update-pull-requests-and-merging.html
|
||||||
|
|
||||||
|
### Use SelfHostBlocks' lib {#usage-lib}
|
||||||
|
|
||||||
|
Access any functions exposed by the [lib][] with this snippet:
|
||||||
|
|
||||||
|
```nix
|
||||||
|
{
|
||||||
|
inputs = {
|
||||||
|
selfhostblocks.url = "github:ibizaman/selfhostblocks";
|
||||||
|
};
|
||||||
|
outputs = { selfhostblocks, ... }:
|
||||||
|
let
|
||||||
|
shblib = selfhostblocks.lib.${system};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
// Use shblib.replaceSecrets for example.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
[lib]: https://github.com/ibizaman/selfhostblocks/blob/main/lib/default.nix
|
||||||
|
|
||||||
## Example Deployment with Nixos-Rebuild {#usage-example-nixosrebuild}
|
## Example Deployment with Nixos-Rebuild {#usage-example-nixosrebuild}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue