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.
- News
-
How to use it
- Lists of options and packages
- Notes
- Why am I building a kernel? Basic cache troubleshooting
A news channel can be found on Telegram.
This tutorial does not apply for users using NixOS 24.11 and other stable channels. This tutorial is for unstable users.
We recommend integrating this repo using Flakes:
# flake.nix
{
description = "My configuration";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
chaotic.url = "github:chaotic-cx/nyx/nyxpkgs-unstable"; # IMPORTANT
};
outputs = { nixpkgs, chaotic, ... }: {
nixosConfigurations = {
hostname = nixpkgs.lib.nixosSystem { # Replace "hostname" with your system's hostname
system = "x86_64-linux";
modules = [
./configuration.nix
chaotic.nixosModules.default # IMPORTANT
];
};
};
};
}
In your configuration.nix
enable the packages and options that you prefer:
# configuration.nix
{ pkgs, ... }:
{
environment.systemPackages = [ pkgs.lan-mouse_git ];
chaotic.mesa-git.enable = true;
}
This tutorial does not apply for users using NixOS unstable channel. This tutorial is for 24.11 and other stable channels.
You won't have access to all the modules and options available to unstable users, as those are prone to breaking due to the divergence between the channels. But you'll have access to all packages, the cache, and the registry.
We recommend integrating this repo using Flakes:
# flake.nix
{
description = "My configuration";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
chaotic.url = "github:chaotic-cx/nyx/nyxpkgs-unstable";
};
outputs = { nixpkgs, chaotic, ... }: {
nixosConfigurations = {
hostname = nixpkgs.lib.nixosSystem { # Replace "hostname" with your system's hostname
system = "x86_64-linux";
modules = [
./configuration.nix # Your system configuration.
chaotic.nixosModules.nyx-cache
chaotic.nixosModules.nyx-overlay
chaotic.nixosModules.nyx-registry
];
};
};
};
}
In your configuration.nix
enable the packages that you prefer:
# configuration.nix
{ pkgs, ... }:
{
environment.systemPackages = [ pkgs.lan-mouse_git ];
boot.kernelPackages = pkgs.linuxPackages_cachyos;
}
This method is for home-manager setups without NixOS.
We recommend integrating this repo using Flakes:
# flake.nix
{
description = "My configuration";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
chaotic.url = "github:chaotic-cx/nyx/nyxpkgs-unstable"; # IMPORTANT
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { nixpkgs, chaotic, ... }: {
# ... other outputs
homeConfigurations = {
# ... other configs
configName = home-manager.lib.homeManagerConfiguration { # Replace "configName" with a significant unique name
pkgs = nixpkgs.legacyPackages.x86_64-linux;
modules = [
./home-manager/default.nix
chaotic.homeManagerModules.default # IMPORTANT
];
};
};
};
}
In your home-manager/default.nix
add a nix.package
, and enable the desired packages:
# configuration.nix
{ 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
.
!!!!!!!!!:: You'll need to enable our module and rebuild your system before adding these derivations to your configuration. Another option, or if you want to use the cache right from the installation media, install your system adding --option 'extra-substituters' 'https://chaotic-nyx.cachix.org/' --option extra-trusted-public-keys "chaotic-nyx.cachix.org-1:HfnXSw4pj95iI/n17rIDy40agHj12WfF+Gqk6SonIT8="
to the end of the nixos-install
(or nixos-rebuild
) command.
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.
We offer cache for x86_64-linux
, aarch64-linux
, and aarch64-darwin
.
Add chaotic to your flake.nix
, make sure to use the rolling *.tar.gz
to keep using the latest packages:
# flake.nix
{
# ... description
inputs = {
# ... nixpkgs, home-manager, etc
chaotic.url = "https://flakehub.com/f/chaotic-cx/nyx/*.tar.gz";
};
# ... outputs
}
Then follow one of the guides above.
From version 6.12 onwards, sched-ext support is officially available on the upstream kernel. You can use the latest kernel (pkgs.linuxPackages_latest
) or our provided CachyOS kernel (pkgs.linuxPackages_cachyos
).
Just add this to your configuration:
# configuration.nix
{
boot.kernelPackages = pkgs.linuxPackages_cachyos;
services.scx.enable = true; # by default uses scx_rustland scheduler
}
Then, reboot with the new configuration, check if the scheduler is running:
╰─λ systemctl status scx.service
If this is not working, check if the current kernel support sched-ext
feature.
╰─λ ls /sys/kernel/sched_ext/
enable_seq hotplug_seq nr_rejected root state switch_all
You can also manually start a scheduler 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.
# configuration.nix
{
services.scx.scheduler = "scx_rusty";
}