First Steps with Cyberus Linux
This section explains the first steps to use Cyberus Linux.
Cyberus Linux is a drop-in replacement for NixOS and Nixpkgs. To use Cyberus Linux, your project needs to use the Cyberus Linux sources instead of the Nixpkgs sources.
Super Quick Start: Update Your Flake Input
The easiest start is if you already have a NixOS-based system with Flakes. In
this case you only need to point your nixpkgs input to the Cyberus Linux tarball
and rebuild.
# Your project's flake.nix
inputs = {
nixpkgs.url = "https://channels.cyberus-linux.com/channel/cyberus-linux-26.05.tar.xz";
};
To avoid rebuilding what we've already built, add our binary cache in
your flake.nix as well. This is optional.
nixConfig = {
extra-substituters = [ "https://cache.cyberus-linux.com" ];
extra-trusted-public-keys = [ "ctrl-os:baPzGxj33zp/P+GAIJXsr8ss9Law+qEEFViX1+flbv8=" ];
};
Done!
Cyberus Linux as a Nix Channel
If your system uses the nix-channel semantics, you need to change the system-wide nixos channel reference to refer to the Cyberus Linux tarball.
This follows the same procedure as upgrading between NixOS releases.
The channel name is still nixos (the last parameter) as this is the identifier used to refer to the Nixpkgs input when building NixOS with nix-channel semantics.
$ sudo nix-channel --list
nixos https://channels.nixos.org/nixos-26.05
$ sudo nix-channel --add https://channels.cyberus-linux.com/channel/cyberus-linux-26.05.tar.xz nixos
$ sudo nix-channel --list
nixos https://channels.cyberus-linux.com/channel/cyberus-linux-26.05.tar.xz
$ sudo nix-channel --update
this derivation will be built:
/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-nixos-26.05.tar.xz.drv
building '/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-nixos-26.05.tar.xz.drv'...
unpacking 1 channels...
Note
When using the nix-channel semantics, a NixOS system evaluates using the system-wide channels,
which are owned and manage by the root user.
If your user has a nixos channel configured, you may want to remove it to prevent unexpected results.
LTS Nix-Based Packages on Ubuntu / Red Hat / SUSE Linux
You can use long-term supported Nix-based packages on any Linux distribution with the Nix package manager. If your project already uses Nix, all you need to do is update your input to Cyberus Linux.
As a Flake Input
Similarly to the system configuration, the release tarball can be used in any Flake.
Just point the nixpkgs input to the Cyberus Linux release tarball:
# flake.nix
{
description = "Hello from Cyberus Linux";
inputs = {
# Use the Cyberus Linux release tarball as nixpkgs input.
nixpkgs.url = "https://channels.cyberus-linux.com/channel/cyberus-linux-26.05.tar.xz";
};
# Speed up builds by using our cache.
nixConfig = {
extra-substituters = [ "https://cache.cyberus-linux.com" ];
extra-trusted-public-keys = [ "ctrl-os:baPzGxj33zp/P+GAIJXsr8ss9Law+qEEFViX1+flbv8=" ];
};
outputs = { self, nixpkgs }: {
packages.x86_64-linux.hello = nixpkgs.legacyPackages.x86_64-linux.hello;
packages.x86_64-linux.default = self.packages.x86_64-linux.hello;
};
}
$ nix build '.#hello'
• Added input 'nixpkgs':
'https://channels.cyberus-linux.com/permanent/cyberus-linux-eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee.tar.xz?narHash=sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA%3D' (20XX-MM-DD)
$ readlink result
/nix/store/441agxbmdlhy3ldycc98dbl5id6fqv3j-hello-2.12.1
$ ./result/bin/hello
Hello, world!
As an npins Pin
A sample project was initialized with npins init, and the following default.nix.
# default.nix
let
sources = import ./npins;
pkgs = import sources.nixpkgs {};
in
{
inherit (pkgs)
hello
;
}
Then npins add can be used to change the nixpkgs input URL.
$ npins add tarball --name nixpkgs https://channels.cyberus-linux.com/channel/cyberus-linux-26.05.tar.xz
[INFO ] Adding 'nixpkgs' …
url: https://channels.cyberus-linux.com/channel/cyberus-linux-26.05.tar.xz
hash: 0000000000000000000000000000000000000000000000000000
frozen: false
$ nix-build --attr hello
/nix/store/441agxbmdlhy3ldycc98dbl5id6fqv3j-hello-2.12.1
Other Input Pinning Tools
The approach is the same as with the previous examples: replace your pinned URL for the Nixpkgs 26.05 release tarball with the Cyberus Linux 26.05 release tarball.
- https://channels.nixos.org/nixos-26.05/nixexprs.tar.xz
+ https://channels.cyberus-linux.com/channel/cyberus-linux-26.05.tar.xz
Don't forget to re-lock the dependencies, which will depend on the exact tool used!
As a User-Configured Channel
Warning
Outside of a system build, it is discouraged to rely on nix-channel for build inputs.
Using nix-channel semantics for non-system builds loses any tracking for the declared (or pinned) input for a given project.
Follow the instructions under Cyberus Linux as a Nix Channel. Change the name of the input as needed, and do not prepend sudo to the commands listed there.