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.input-leap-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.input-leap-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://nyx.chaotic.cx/' --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.
First, add this to your configuration:
{
boot.kernelPackages = pkgs.linuxPackages_cachyos-sched-ext;
environment.systemPackages = [ pkgs.scx ];
}
Then, with the new kernel booted, check if the correct kernel booted:
╰─λ zgrep 'SCHED_CLASS' /proc/config.gz
CONFIG_SCHED_CLASS_EXT=y
The last step is to start a scheduler:
╰─λ 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
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.
{
services.xserver.windowManager.qtile = {
enable = true;
backend = "wayland";
package = pkgs.qtile-module_git;
extraPackages = _pythonPackages: [ pkgs.qtile-extras_git ];
};
# if you want a proper wayland+qtile session, and/or a "start-qtile" executable in PATH:
chaotic.qtile.enable = true;
}
Our nyxpkgs-unstable
branch is the one that's always cached.
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;
.
The code in the devshells
directory is used to automate our CIs and maintainence processes.
To build all the packages and push their cache usptream, use:
nix develop . -c chaotic-nyx-build
This commands will properly skip already-known failures, evaluation failures, building failures, and even skip any chain of failures caused by internal-dependecies. It will also avoid to download what it's already in our cache and in the upstream nixpkgs' cache.
A list of what successfully built, failed to build, hashes of all failures, paths to push to cache and logs will be available at the /tmp/nix-shell.*/tmp.*/
directory. This directory can be specified with the NYX_WD
envvar.
You can compare a branch with another like this:
machine=$(uname -m)-linux
A='github:chaotic-cx/nyx/branch-a'
B='github:chaotic-cx/nyx/branch-b'
nix build --impure --expr \
"(builtins.getFlake \"$A\").devShells.$machine.comparer.passthru.any \"$B\""
After running, you'll find all the derivations that changed in the result
file.
All the hashes that are known to produce build-time failures are kept in devshells/failures.nix
.
Our builder produces a new-failures.nix
that must be used to update this file in every PR.
There are none (so far).