diff --git a/CHANGELOG.md b/CHANGELOG.md index abc1220..bf078b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,13 @@ Template: --> -# v0.2.2 (unreleased) +# Upcoming Release + +## Other Changes + +- Show how to pin Self Host Blocks flake input to a tag. + +# v0.2.2 ## User Facing Backwards Compatible Changes diff --git a/README.md b/README.md index 856beb5..7ed4cc9 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,13 @@ To use it in your project, add the following flake input: inputs.selfhostblocks.url = "github:ibizaman/selfhostblocks"; ``` +Then, pin it to a release/tag with the following snippet. +Updating Self Host Blocks to a new version can be done the same way. + +```nix +nix flake lock --override-input selfhostblocks github:ibizaman/selfhostblocks/v0.2.2 +``` + To get started using Self Host Blocks, follow [the usage section](https://shb.skarabox.com/usage.html) of the manual. It goes over how to deploy with [Colmena][], [nixos-rebuild][] diff --git a/docs/redirects.json b/docs/redirects.json index a6d94c4..b37b6a4 100644 --- a/docs/redirects.json +++ b/docs/redirects.json @@ -1619,6 +1619,18 @@ "usage-flake": [ "usage.html#usage-flake" ], + "usage-flake-autoupdate": [ + "usage.html#usage-flake-autoupdate" + ], + "usage-flake-nixpkgs": [ + "usage.html#usage-flake-nixpkgs" + ], + "usage-flake-substituter": [ + "usage.html#usage-flake-substituter" + ], + "usage-flake-tag": [ + "usage.html#usage-flake-tag" + ], "usage-secrets": [ "usage.html#usage-secrets" ] diff --git a/docs/usage.md b/docs/usage.md index 9751188..c8aa503 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -16,6 +16,8 @@ imports = [ ]; ``` +### Substituter {#usage-flake-substituter} + You can also use the public cache as a substituter with: ```nix @@ -28,6 +30,8 @@ nix.settings.substituters = [ ]; ``` +### Follow Nixpkgs {#usage-flake-nixpkgs} + Self Host Blocks provides its own `nixpkgs` input so both can be updated in lock step, ensuring maximum compatibility. It is recommended to use the following `nixpkgs` as input for your deployments. Also, patches can be applied by Self Host Blocks. To handle all this, you need the @@ -52,6 +56,18 @@ in Advanced users can if they wish use a version of `nixpkgs` of their choosing but then we cannot guarantee Self Host Block won't use a non-existing option from `nixpkgs`. +### Tag Updates {#usage-flake-tag} + +To pin Self Host Blocks to a release/tag, run the following snippet: + +```nix +nix flake lock --override-input selfhostblocks github:ibizaman/selfhostblocks/v0.2.2 +``` + +Updating Self Host Blocks to a new version can be done the same way. + +### Auto Updates {#usage-flake-autoupdate} + To avoid manually updating the `nixpkgs` version, the [GitHub repository][1] for Self Host Blocks tries to update the `nixpkgs` input daily, verifying all tests pass before accepting this new `nixpkgs` version. The setup is explained in [this blog post][2].