The NixOS cheatsheet describes how to install packages from unstable
in configuration.nix
.
It starts off by saying to add the unstable channel like so:
$ sudo nix-channel --add https://nixos.org/channels/nixpkgs-unstable
$ sudo nix-channel --update
Then, it is easy to use this channel in configuration.nix
(since it should now be on NIX_PATH
):
nixpkgs.config = {
allowUnfree = true;
packageOverrides = pkgs: {
unstable = import <nixos-unstable> {
config = config.nixpkgs.config;
};
};
};
environment = {
systemPackages = with pkgs; [
unstable.google-chrome
];
};
I would like to not have to do the manual nix-channel --add
and nix-channel --update
steps.
I would like to be able to install my system from configuration.nix
without first having to run the nix-channel --add
and nix-channel --update
steps.
Is there a way to automate this from configuration.nix
?