Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[other] show how to pin flake input to a tag #364

Merged
merged 1 commit into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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][]
Expand Down
12 changes: 12 additions & 0 deletions docs/redirects.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
Expand Down
16 changes: 16 additions & 0 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ imports = [
];
```

### Substituter {#usage-flake-substituter}

You can also use the public cache as a substituter with:

```nix
Expand All @@ -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
Expand All @@ -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].
Expand Down