Before this, a value that does not correspond to an attribute under a
package alias' `versions` would make it default to the latest as defined
by `lib.packages.getLatest`, which isn't a silver bullt: it choose
"bash5.2.15-bootstrap" for instance instead of stage1-passthrough (and I
don;t think we have an easy fix for that).
Given values like `"1.2.3"` makes little sense in
`config.preferences.packages.version` (because it's a package-set-wide
preference), this means it was hardly ever useful.
before:
```console
❯ nix eval -f tidepool --apply 't:
t.extend {modules = [{config.preferences.packages.version = "latest";}];}
|> (t: t.config.lib.packages.resolve t.config.packages.foundation.bash)
|> (p: p.version)'
"5.2.15-bootstrap"
❯ nix eval -f tidepool --apply 't:
t.extend {modules = [{config.preferences.packages.version = "stable";}];}
|> (t: t.config.lib.packages.resolve t.config.packages.foundation.bash)
|> (p: p.version)'
"5.2.15-bootstrap"
```
after:
```console
❯ nix eval -f tidepool --apply 't:
t.extend {modules = [{config.preferences.packages.version = "latest";}];}
|> (t: t.config.lib.packages.resolve t.config.packages.foundation.bash)
|> (p: p.version)'
"5.2.15-stage1-passthrough"
❯ nix eval -f tidepool --apply 't:
t.extend {modules = [{config.preferences.packages.version = "stable";}];}
|> (t: t.config.lib.packages.resolve t.config.packages.foundation.bash)
|> (p: p.version)'
"5.2.15-bootstrap"
```
Co-authored-by: austreelis <git@swhaele.net>
Reviewed-on: #33
Reviewed-by: Ruby Iris Juric <ruby+auxolotl@srxl.me>
Co-authored-by: Austreelis <austreelis@noreply.git.auxolotl.org>
Co-committed-by: Austreelis <austreelis@noreply.git.auxolotl.org>
|
||
|---|---|---|
| .. | ||
| npins | ||
| src | ||
| default.nix | ||
| flake.lock | ||
| flake.nix | ||
| LICENSE | ||
| README.md | ||
Aux Tidepool
Aux Tidepool is an initial package set built on top of Aux Foundation. Packages are created and managed using Aux Lib's module system to allow for highly dynamic and extensible configuration.
Usage
Packages can be imported both with and without Nix Flakes. To import them using Nix Flakes, add this repository as an input.
inputs.tidepool.url = "https://git.auxolotl.org/auxolotl/labs/archive/main.tar.gz?dir=tidepool";
To import this library without using Nix Flakes, you will need to use fetchTarball and
import the library entrypoint.
let
labs = builtins.fetchTarball {
url = "https://git.auxolotl.org/auxolotl/labs/archive/main.tar.gz";
sha256 = "<sha256>";
};
tidepool = import "${labs}/tidepool" {};
in
# ...