After using nix-build to install a package from unstable, how do i add it to the configuration.nix?nix-build -I nixpkgs=https://github.com/NixOS/nixpkgs-channels/archive/nixos-unstable.tar.gz idea-ultimateThe only approach i could think of is using the build-in function fetchTarball on the archive to some temporary location and then nix-env -f on it - is there a better way?
How to add one-off packages to the configuration declaratively?
nixos
You could add the channel as rootsudo nix-channel --add https://nixos.org/channels/nixos-unstable unstablesudo nix-channel --update unstableand add the package to configuration.nix like this:systemPackages = [ ... (import <unstable> {}).idea.idea-ultimate ];If you jsut want to install it to your user profile, use nix-env . I would just add the channel instead of fiddling with fetchTarball though. (then it's simply nix-env -iA unstable.idea.idea-ultimate)Not sure this is the most idiomatic way.