parent
1be18e491b
commit
87e36b9f18
18
.github/workflows/flakehub-publish.yml
vendored
18
.github/workflows/flakehub-publish.yml
vendored
|
@ -1,18 +0,0 @@
|
||||||
name: "Publish to FlakeHub"
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- "v*.*.*"
|
|
||||||
jobs:
|
|
||||||
flakehub-publish:
|
|
||||||
runs-on: "ubuntu-latest"
|
|
||||||
permissions:
|
|
||||||
id-token: "write"
|
|
||||||
contents: "read"
|
|
||||||
steps:
|
|
||||||
- uses: "actions/checkout@v3"
|
|
||||||
- uses: "DeterminateSystems/nix-installer-action@main"
|
|
||||||
- uses: "DeterminateSystems/flakehub-push@main"
|
|
||||||
with:
|
|
||||||
name: "edolstra/flake-compat"
|
|
||||||
visibility: "public"
|
|
19
README.md
19
README.md
|
@ -2,10 +2,25 @@
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
|
> [!WARNING]
|
||||||
|
> During the Lix private beta period during which Forgejo is private, this
|
||||||
|
> requires configuring netrc in Lix for the tarball download to work.
|
||||||
|
>
|
||||||
|
> Your netrc should look something like so:
|
||||||
|
> ```
|
||||||
|
> machine git.lix.systems login YOUR-USERNAME password SOME-PERSONAL-ACCESS-TOKEN-REPO-READ
|
||||||
|
> ```
|
||||||
|
>
|
||||||
|
> We are terribly sorry for the UX for this being very bad
|
||||||
|
> ([issue](https://git.lix.systems/lix-project/lix/issues/254)).
|
||||||
|
|
||||||
To use, add the following to your `flake.nix`:
|
To use, add the following to your `flake.nix`:
|
||||||
|
|
||||||
|
<!-- FIXME: this can use the standard non-api archive url when we are
|
||||||
|
un-privated -->
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
inputs.flake-compat.url = "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz";
|
inputs.flake-compat.url = "https://git.lix.systems/api/v1/repos/lix-project/flake-compat/archive/main.tar.gz";
|
||||||
```
|
```
|
||||||
|
|
||||||
Afterwards, create a `default.nix` file containing the following:
|
Afterwards, create a `default.nix` file containing the following:
|
||||||
|
@ -15,7 +30,7 @@ Afterwards, create a `default.nix` file containing the following:
|
||||||
(
|
(
|
||||||
let lock = builtins.fromJSON (builtins.readFile ./flake.lock); in
|
let lock = builtins.fromJSON (builtins.readFile ./flake.lock); in
|
||||||
fetchTarball {
|
fetchTarball {
|
||||||
url = lock.nodes.flake-compat.locked.url or "https://github.com/edolstra/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz";
|
url = lock.nodes.flake-compat.locked.url;
|
||||||
sha256 = lock.nodes.flake-compat.locked.narHash;
|
sha256 = lock.nodes.flake-compat.locked.narHash;
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue