File tree Expand file tree Collapse file tree 1 file changed +12
-20
lines changed Expand file tree Collapse file tree 1 file changed +12
-20
lines changed Original file line number Diff line number Diff line change 22
33## Usage
44
5- > [ !WARNING]
6- > During the Lix private beta period during which Forgejo is private, this
7- > requires configuring netrc in Lix for the tarball download to work.
8- >
9- > Your netrc should look something like so:
10- > ```
11- > machine git.lix.systems login YOUR-USERNAME password SOME-PERSONAL-ACCESS-TOKEN-REPO-READ
12- > ```
13- >
14- > We are terribly sorry for the UX for this being very bad
15- > ([issue](https://git.lix.systems/lix-project/lix/issues/254)).
16-
175To use, add the following to your ` flake.nix ` :
186
19- <!-- FIXME: this can use the standard non-api archive url when we are
20- un-privated -->
21-
227``` nix
23- inputs.flake-compat.url = "https://git.lix.systems/api/v1/repos/lix-project/flake-compat/archive/main.tar.gz";
8+ inputs.flake-compat = {
9+ url = "git+https://git.lix.systems/lix-project/flake-compat";
10+ # Optional:
11+ flake = false;
12+ };
2413```
2514
2615Afterwards, create a ` default.nix ` file containing the following:
2716
2817``` nix
2918(import
3019 (
31- let lock = builtins.fromJSON (builtins.readFile ./flake.lock); in
32- fetchTarball {
33- url = lock.nodes.flake-compat.locked.url;
34- sha256 = lock.nodes.flake-compat.locked.narHash;
20+ let
21+ lock = builtins.fromJSON (builtins.readFile ./flake.lock);
22+ inherit (lock.nodes.flake-compat.locked) narHash rev url;
23+ in
24+ builtins.fetchTarball {
25+ url = "${url}/archive/${rev}.tar.gz";
26+ sha256 = narHash;
3527 }
3628 )
3729 { src = ./.; }
You can’t perform that action at this time.
0 commit comments