Nix flake for "too much bleeding-edge" and unreleased packages (e.g., mesa_git, linux_cachyos, firefox_nightly, sway_git, gamescope_git). And experimental modules (e.g., HDR, duckdns).
From the Chaotic Linux User Group (LUG), the same one that maintains Chaotic-AUR! 🧑🏻💻
The official source-code repository is available as "chaotic-cx/nyx" at GitHub.
PLEASE AVOID POSTING ISSUES IN NIXOS' MATRIX, DISCOURSE, DISCORD, ETC. USE OUR REPO'S ISSUES, TELEGRAM GROUP, OR #chaotic-nyx:ubiquelambda.dev
ON MATRIX INSTEAD.
A news channel can be found on Telegram.
We recommend integrating this repo using Flakes:
{
description = "My configuration";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
chaotic.url = "github:chaotic-cx/nyx/nyxpkgs-unstable";
};
outputs = { nixpkgs, chaotic, ... }: {
nixosConfigurations = {
hostname = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./configuration.nix # Your system configuration.
chaotic.nixosModules.default # OUR DEFAULT MODULE
];
};
};
};
}
In your configuration.nix
enable the packages and options that you prefer:
{ pkgs, ... }:
{
environment.systemPackages = [ pkgs.lan-mouse_git ];
chaotic.mesa-git.enable = true;
}
This method is for home-manager setups without NixOS.
We recommend integrating this repo using Flakes:
{
description = "My configuration";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
chaotic.url = "github:chaotic-cx/nyx/nyxpkgs-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { nixpkgs, chaotic, ... }: {
homeConfigurations = {
hostname = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux;
modules = [
./home-manager/default.nix
chaotic.homeManagerModules.default # OUR DEFAULT MODULE
];
};
};
};
}
In your home-manager/default.nix
add a nix.package
, and enable the desired packages:
{ pkgs, ... }:
{
nix.package = pkgs.nix;
home.packages = [ pkgs.lan-mouse_git ];
}
Besides using our module/overlay, you can run packages (without installing them) using:
nix run github:chaotic-cx/nyx/nyxpkgs-unstable#firefox_nightly
You'll get the binary cache added to your configuration as soon as you add our default module. We do this automatically, so we can gracefully update the cache's address and keys without prompting you for manual work.
If you dislike this behavior for any reason, you can disable it with chaotic.nyx.cache.enable = false
.
Remember: If you want to fetch derivations from our cache, you'll need to enable our module and rebuild your system before adding these derivations to your configuration.
Commands like nix run ...
, nix develop ...
, and others, when using our flake as input, will ask you to add the cache interactively when missing from your user's nix settings.
If you want to use the cache right from the installation media, install your system using nixos-install --flake /mnt/etc/nixos#mymachine --option 'extra-substituters' 'https://chaotic-nyx.cachix.org/' --option extra-trusted-public-keys "chaotic-nyx.cachix.org-1:HfnXSw4pj95iI/n17rIDy40agHj12WfF+Gqk6SonIT8="
(replace mymachine
with your new host's name).
Add chaotic to your flake.nix
, make sure to use the rolling *.tar.gz
to keep using the latest packages:
{
inputs.chaotic.url = "https://flakehub.com/f/chaotic-cx/nyx/*.tar.gz";
}
Then follow one of the guides above.
An always up-to-date list of all our options and packages is available at: List page.
Some packages are harder to use, I'll go into details in the following paragraphs.
Since sched-ext patches have been added to linux-cachyos
, you can just use that kernel.
First, add this to your configuration:
{
boot.kernelPackages = pkgs.linuxPackages_cachyos;
chaotic.scx.enable = true; # by default uses scx_rustland scheduler
}
Then, with the new kernel booted, check if the correct kernel booted:
╰─λ zgrep 'SCHED_CLASS' /proc/config.gz
CONFIG_SCHED_CLASS_EXT=y
If the scheduler is not working for some reason, you can manually start it like:
╰─λ sudo scx_rusty
21:38:53 [INFO] CPUs: online/possible = 24/32
21:38:53 [INFO] DOM[00] cpumask 00000000FF03F03F (20 cpus)
21:38:53 [INFO] DOM[01] cpumask 0000000000FC0FC0 (12 cpus)
21:38:53 [INFO] Rusty Scheduler Attached
You can choose a different scheduler too.
{
chaotic.scx.scheduler = "scx_rusty";
}
There are other scx_* binaries for you to play with, or head to github.com/sched-ext/scx for instructions on how to write one of your own.
:godmode: Our nyxpkgs-unstable
branch is the one that's always cached.
:shipit: The main
branch is the primary target for contribution.
We do accept third-party authored PRs.
If you are interested in pushing any of these packages to the upstream nixpkgs, you have our blessing.
If one of our contributors is mentioned in the deveriation's mantainers list (in this repository) please keep it when pushing to nixpkgs. But, please, tag us on the PR so we can participate in the reviewing.
You are free to use our code, or portions of our code, following the MIT license restrictions.
If you have any suggestion to enhance our packages, modules, or even the CI's codes, let us know through the GitHub repo's issues.
For cache reasons, Chaotic-Nyx now defaults to always use nixpkgs as provider of its dependencies.
If you need to change this behavior, set chaotic.nyx.onTopOf = "user-pkgs";
. Be warned that you mostly won't be able to benefit from our binary cache after this change.
You can also disable our overlay entirely by configuring chaotic.nyx.overlay.enable = false;
.
Even though we provide linuxPackages_cachyos-lto
, we don't maintain the kernel modules in it. Nixpkgs, where the derivations originate from, doesn't provide kernels built with Clang. Consequentially, adding later support for all the kernel modules available in Nixpkgs wouldn't be easy. Presently, xone
is the only one guaranteed to work, and ZFS is known to not work.
Other variations of linuxPackages_cachyos
works without any issues. But, we don't build the ones in linuxPackages_cachyos-rc
, they should work, but don't expect cache for them.
For starters, suppose you're using our linuxPackages_cachyos
as the kernel and an up-to-date flake lock. Check if all these three hashes prompt the same:
╰─λ nix eval 'github:chaotic-cx/nyx/nyxpkgs-unstable#linuxPackages_cachyos.kernel.outPath'
"/nix/store/441qhriiz5fa4l3xvvjw3h4bps7xfk08-linux-6.8.7"
╰─λ nix eval 'chaotic#linuxPackages_cachyos.kernel.outPath'
"/nix/store/441qhriiz5fa4l3xvvjw3h4bps7xfk08-linux-6.8.7"
╰─λ nix eval '/etc/nixos#nixosConfigurations.{{HOSTNAME}}.config.boot.kernelPackages.kernel.outPath'
"/nix/store/441qhriiz5fa4l3xvvjw3h4bps7xfk08-linux-6.8.7"
If the second is different from the first, you're probably adding a inputs.nixpkgs.follows
to chaotic
, simply remove it.
If the third is different from the first, you're most likely using an overlay that's changing the kernel or one of its dependencies; check your nixpkgs.overlays
config.
If they all match, and you're still rebuilding the kernel, copy the hash from the result above, then change it in the following curl
command:
╰─λ curl -L 'https://chaotic-nyx.cachix.org/441qhriiz5fa4l3xvvjw3h4bps7xfk08.narinfo'
StorePath: /nix/store/441qhriiz5fa4l3xvvjw3h4bps7xfk08-linux-6.8.7
URL: nar/e5ccded34e4608448c49d3e9fdc92441cd564ae629a4b93fd3f8a334bca7c71d.nar.zst
Compression: zstd
FileHash: sha256:e5ccded34e4608448c49d3e9fdc92441cd564ae629a4b93fd3f8a334bca7c71d
FileSize: 172226528
NarHash: sha256:1v410bnc3qazxscwxvm80c40i0fxzp0amvp93y0y4x3kikdwz035
NarSize: 184989384
References:
Deriver: snb6mg44fflzp3vm5fh4ybxa5j4nlfa5-linux-6.8.7.drv
Sig: chaotic-nyx.cachix.org-1:L0D5GiJf/VEc1brcqYSB+vzYDDV6ZoDP59b+0mrX3bm2b5bbvtH3xOR4XEXy7QILYoIx2Pd64qWN+6okOMQZCA==
If the command above fails without an 404, then you have an issue with your internet connection. If it fails with 404, then tag pedrohlc
(Matrix, Telegram or GitHub), he really broke the cache.
If the command succeeds, and you're still building the cache, it can happen because of two things: (1) you might have tried to fetch said package before we deployed, then Nix will cache the 404 and won't try again; (2) you might have a misconfigured /etc/nix/nix.conf
or outdated nix-daemon.
For the second one, check if it looks like this (the word “chaotic” should appear three times):
╰─λ grep chaotic /etc/nix/nix.conf
substituters = https://nix-community.cachix.org/ https://chaotic-nyx.cachix.org/ https://cache.nixos.org/
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= chaotic-nyx.cachix.org-1:HfnXSw4pj95iI/n17rIDy40agHj12WfF+Gqk6SonIT8
An outdated nix-daemon can happen when you change nix settings, then nixos-rebuilt your system, but you didn't restart the nix-daemon service. The easiest way to fix it is to reboot.