I have been doing it this way:
- Add the channel as root
sudo nix-channel --add https://nixos.org/channels/nixos-unstable nixos-unstable
sudo nix-channel --update
- Edit the nix file with your environment.systemPackages something like this:
let
unstable = import <nixos-unstable> { config = { allowUnfree = true; }; };
in {
environment.systemPackages = with pkgs; [
wget
vim
unstable.ffmpeg
];
}
It is covered in one of the docs but I can never find it when I need it.