INSTALLRYOKU.
A fresh-NixOS walkthrough written for people who have never used flakes before. Follow it in order; every command tells you exactly where it belongs.
You only need a normal NixOS install.
You should already be booted into NixOS, connected to the internet, and able to use sudo. Your normal configuration should exist at /etc/nixos/configuration.nix.
Turn on the Nix features Ryoku needs.
Open your NixOS configuration.
sudo nano /etc/nixos/configuration.nix
Add this inside the main { } block.
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
Do not paste it above the opening { or below the final }.
Save and close Nano.
Apply the change.
sudo nixos-rebuild switch
If this finishes successfully, flakes are enabled.
Make the system itself flake-based.
Create one new file alongside your existing NixOS configuration. Your existing configuration.nix and hardware-configuration.nix stay where they are.
Create the file.
sudo nano /etc/nixos/flake.nix
Paste this beginner flake.
{
description = "My NixOS system";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-26.05";
};
outputs = { nixpkgs, ... }: {
nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./configuration.nix
];
};
};
}
This creates a flake target called nixos, which is why the rebuild command below ends in #nixos.
Save it.
Make sure NixOS rebuilds before adding Ryoku.
sudo nixos-rebuild switch --flake /etc/nixos#nixos
See what the installer will do first.
Run this as your normal user. Do not put sudo in front of it; the installer asks for elevated access only when it actually needs it.
nix run github:aethctl/Ryoku-on-NixOS/main#install -- --dry-run
The dry run does not install Ryoku. It gives you a chance to inspect the planned integration first.
Install Ryoku.
nix run github:aethctl/Ryoku-on-NixOS/main#install
The installer integrates Ryoku into your existing flake, builds a new NixOS generation, and switches only after that build succeeds.
Future updates are one command.
ryoku update
Ryoku advances its Nix flake input, builds a new NixOS generation, and switches to it. You do not need to reinstall or clone the repository again.
Do not panic-reinstall.
NixOS gives us a much better failure model than destructive package replacement. A failed build should be diagnosed from the exact error first.
/etc/nixos#nixos before Ryoku.