Lix Private Beta Guide
Thank you for choosing to help us in our private beta! Please keep quiet that there is a fork and who is involved <3
There is a lot of work-in-progress documentation and a lot of it is work in progress or awaiting move to the wiki. Our apologies for this state, let us know if there is something you need.
If you run into any friction, please let us know. We would like to hear all your complaints, and this private beta is as much about testing our processes as it is about testing the software.
There is a Matrix space where we have a channel for announcements and support. Please join these! (FIXME) Currently these are manually managed, so message @hexchen:colon.at or @jade_:matrix.org for an invite if you need one. This is the Matrix space link: https://matrix.to/#/!nxwawS5Vkgs8UUEI:colon.at?via=colon.at&via=matrix.org&via=matrix.eno.space, but you need an invite if you are not already in it.
Getting yourself set up
Once you have gotten to this page, you have evidently already logged in successfully. Note that your email will be visible on Gerrit if you use it, so change it on https://identity.lix.systems if necessary.
The guide here expects that you have configured a SSH key on Forgejo.
A brief tour of the Lix systems
See Information Organisation for where information is.
The Lix sources are developed on Gerrit, built with Buildbot, and released on a Forgejo repo.
Contributor documentation for the project is maintained on this wiki. FIXME(jade): a lot of it is awaiting migration onto the wiki from the private pad system, see tracking issue.
Status
We are confident enough to run nightly builds on the machines we care about. We expect Lix to have, generally, fewer bugs than Nix 2.18, which is what you probably already have.
Notable changes:
- REPL is much better
- The debugger is no longer missing variables
-
--debugger-on-trace
gives you a debugger forbuiltins.trace
- The
nix repl
startup messages have been shortened
- Many errors now print the value in question (
cannot coerce set to string
,expected list but got string
, etc.) - Many bugs have been fixed, in general:
-
nix eval nixpkgs#hello
now gives the derivation path instead of hanging -
nix-env -qa
lists all attribute paths leading to a package, instead of missing some
-
-
nix flake check -v
prints what is being checked (and now we notice how slow that command is) - Stack overflow is now caught properly
- Performance improvements (8-20% faster than 2.18)
- Correctness (inherit-from laziness fixed)
-
nix repl
can:doc
library functions. -
nix repl
can accept overlays as config files Soon(tm)
Currently we do not have the installer ready. We are also working on a binary cache, but this will be available in the future. When it is done, it will be added to the NixOS module.
Leaks that are ok
We consider it OK to use the overlay and input in public dotfiles, as long as they don't make it more clear than necessary what they are.
For example, adding it to overlays in a NixOS configuration repo is ok, as it is not clear what the overlay actually does. For a concrete example of such an acceptable leak, see jade's dotfiles.
Installation
You will need to have SSH access to Lix's Git repositories. Add your SSH public key information to your Forgejo user settings. If that is setup correctly you should be able to clone the Lix repository without issue, using:
$ git clone ssh://git@git.lix.systems/lix-project/lix
You don't need to have the repo cloned to use Lix, but it will confirm that you have access correctly setup :)
On NixOS/nix-darwin
Use the overlay: https://git.lix.systems/lix-project/nixos-module
Please file bugs if this explodes the build of tooling you use, we can fix it in the overlay.
Flakes
Add Lix to your system configuration like so:
{
inputs = {
lix = {
url = "git+ssh://git@git.lix.systems/lix-project/lix";
flake = false;
};
lix-module = {
url = "git+ssh://git@git.lix.systems/lix-project/nixos-module";
inputs.nixpkgs.follows = "nixpkgs";
inputs.lix.follows = "lix";
};
};
outputs = {nixpkgs, lix-module, lix, ...}: {
# or equivalent for darwin
nixosConfigurations.your-box = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./machines/your-box
lix-module.nixosModules.default
];
};
};
}
You can then update it with nix flake update lix; nix flake update lix-module
.
Not flakes
Also supported.
Add inputs for git@git.lix.systems:lix-project/lix
and git@git.lix.systems:lix-project/nixos-module
to your preferred pinning tool.
Use in a NixOS module: e.g. imports = [ (import "${your-pinning-thingy.lix-nixos-module}/module.nix" { lix = your-pinning-thingy.lix; }) ];
On other Linux or on macOS
Currently we are still working on the installer (see tracking project). It is possible to convert an existing Nix install to Lix.
flakey-profile
This is experimental. We believe that people have successfully used it on macOS. We have tested it on an Arch Linux system installed a long time ago with the shell-based installer, and it works fine. This method works by replacing your system profile with one that is built by simple Nix code with flakey-profile.
You can rollback if it blows up by /nix/var/nix/profiles/default-{SECOND-HIGHEST-NUMBER}/bin/nix-env --rollback --profile /nix/var/nix/profiles/default
.
Clone git@git.lix.systems:lix-project/nixos-module.git
, then, inside it, run sudo nix run --extra-experimental-features 'nix-command flakes' .#system-profile.switch
.
Finally, run sudo systemctl restart nix-daemon
, or, for macOS (FIXME someone please test these; they won't break your computer but I haven't tested them myself):
sudo launchctl stop system/org.nixos.nix-daemon
sudo launchctl enable system/org.nixos.nix-daemon
sudo launchctl load /Library/LaunchDaemons/org.nixos.nix-daemon.plist
sudo launchctl kickstart -k system/org.nixos.nix-daemon
Manually, with nix profile
We::Qyriad have used these steps on macOS has it has seemed to work, but we would recommend flakey-profile over it.
$ sudo -H --preserve-env=SSH_AUTH_SOCK nix --experimental-features 'nix-command flakes' profile install --profile /nix/var/nix/profiles/default git+ssh://git@git.lix.systems/lix-project/lix --priority 3
-
--preserve-env=SSH_AUTH_SOCK
assumes that your SSH agent is important to access the Lix repo -
--priority 3
makes it symlink Lix over your existing Nix install
If you then run sudo nix --experimental-features 'nix-command flakes' profile list --profile /nix/var/nix/profiles/default
, you should get output similar to this:
Index: 0
Store paths: /nix/store/8ma7xas2nb0i3lq8mm7fpgalv94s8pzh-nss-cacert-3.92
Index: 1
Store paths: /nix/store/53r8ay20mygy2sifn7j2p8wjqlx2kxik-nix-2.19.2
Index: 2
Flake attribute: packages.aarch64-darwin.default
Original flake URL: git+ssh://git@git.lix.systems/lix-project/lix
Locked flake URL: git+ssh://git@git.lix.systems/lix-project/lix?ref=refs/heads/main&rev=98b497a1a43a4ff39263ed5259f12c5d00b4d8c0
Store paths: /nix/store/8040hxr4rr8bpb5yp4b48709x3qs4bwb-nix-2.90.0
You may then use sudo nix --experimental-features 'nix-command flakes' profile remove --profile /nix/var/nix/profiles/default 1
to remove your original installation of Nix. This is (probably) optional.
Verification
You should now get something like the following:
~ ยป nix --version
nix (Nix) 2.90.0-lixpre20240324-f86b965