Skip to content

Daaboulex/scx-git-nix

Repository files navigation

scx-git-nix

CI NixOS unstable License: MIT

Bleeding-edge sched-ext schedulers built from the tip of main and packaged for NixOS. Always the latest scx_lavd, scx_rusty, scx_layered, scx_flash, scx_bpfland and friends.

Upstream

Project sched-ext/scx
License GPL-2.0
Tracked Git commits (main branch)

What Is This?

A Nix flake that packages the Rust userspace schedulers from sched-ext/scx at the latest commit, rebuilt automatically as upstream advances. The C example schedulers (a separate, rarely-changing scx-c-examples repo, not recommended for end users) are pulled in from nixpkgs so the full scheduler set is available with a single git pin.

What's Included

  • scx-git — the git-main Rust schedulers (scx_rusty, scx_lavd, scx_layered, scx_bpfland, scx_flash, scx_rustland, …).
  • scx-git-full (default)scx-git plus nixpkgs' C example schedulers, the git analogue of pkgs.scx.full. No gaps in the available scheduler set.
  • An overlay exposing pkgs.scx-git / pkgs.scx-git-full.
  • A NixOS module that points services.scx at the git schedulers.

Requirements

  • A Linux kernel 6.12 or newer with sched_ext enabled (e.g. recent CachyOS, or boot.kernelPackages = pkgs.linuxPackages_latest). The package builds on any kernel; the schedulers only run on a sched_ext kernel.
  • x86_64-linux and aarch64-linux (built from source; upstream scx is architecture-portable).

Installation

Add the flake and apply the overlay + module:

{
  inputs.scx-git.url = "github:Daaboulex/scx-git-nix";

  # in your NixOS configuration:
  imports = [ inputs.scx-git.nixosModules.default ];
  nixpkgs.overlays = [ inputs.scx-git.overlays.default ];

  scx-git.enable = true;        # point services.scx at the git schedulers
  services.scx = {
    enable = true;
    scheduler = "scx_rusty";    # or scx_lavd, scx_layered, scx_bpfland, …
  };
}

Usage

Run a scheduler ad-hoc

Schedulers must run as root on a sched_ext kernel (6.12+):

nix build github:Daaboulex/scx-git-nix#scx-git
sudo ./result/bin/scx_rusty        # or scx_lavd, scx_layered, scx_bpfland, …

As a package

environment.systemPackages = [ inputs.scx-git.packages.${system}.scx-git-full ];

scx-git.full = false; selects the Rust schedulers only.

Updates

A scheduled GitHub Action tracks sched-ext/scx main, bumps the pinned commit, regenerates the source and Cargo hashes, builds, and only lands the change if it passes. Failures open an issue instead of merging.

Development

nix develop          # lint/format shell
nix flake check      # build every scheduler + the module-eval check
nix build .#scx-git  # the Rust schedulers

Credits

All scheduler work is by the sched-ext project and contributors. This repo only packages it for Nix.

License

Packaging is MIT (see LICENSE); the schedulers themselves are GPL-2.0, upstream.


Maintained as part of the Daaboulex NixOS ecosystem.

About

sched-ext (scx) Rust schedulers built from git main, packaged for NixOS - overlay + NixOS module

Topics

Resources

License

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors