[Nix-dev] Some NixOS beginner questions...

Kirill Elagin kirelagin at gmail.com
Mon Mar 31 15:21:06 CEST 2014


On Mon, Mar 31, 2014 at 2:22 AM, Ben Franksen <ben.franksen at online.de>wrote:

> > Then I
> > do `nix-env -i` (or whatever I need) with `-f
> > <path_to_my_copy_of_nixpkgs>`. That tells Nix to use _my_ expressions. In
> > case of `nixos-rebuild` there is `-I` flag.
>
> As I said, I really like the declarative system configuration and therefore
> want to avoid ad-hoc installation using nix-env if possible. However, I
> guess I can adapt that approach to changing my configuration.nix and then
> doing a nixos-rebuild.
>

If you, for some reason, don't want to install packages to your user
profile with `nix-env -i`
you are free to list those packages in `environment.systemPackages`.
My point was that `nixos-rebuild` has an option `-I` that tells it to use
your source of expressions.
So if you want to modify some NixOS modules or Nix packages, you do this in
your local nixpkgs repo,
edit `configuration.nix` accordingly, and run `nixos-rebuild -I
nixpkgs=<path_to_your_nixpkgs> switch`.
Of course you can have release branched checked-out in your local repo and
you'll get the release version of NixOS
with your modifications.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20140331/7704b3a9/attachment.html 


More information about the nix-dev mailing list