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

Kirill Elagin kirelagin at gmail.com
Sun Mar 30 23:35:15 CEST 2014


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

> (2) It seems impossible to install NixOS w/o installing the boot loader.
>

Hm,

boot.loader.grub.enable = false;

?


> (3) I love the declarative approach to system configuration. However, for a
> newcomer it is hard to find out how to configure his favorite packages.
> What
> options are there and how can I set them? Is looking at the 'sources' (for
> the package's nix expressions) the only way?


Yes, I guess, looking at the expressions is the only option right now.
You set them in `~/.nixpkgs/config.nix`. That's the file where your
configuration options for
packages and all your package overrides go.


> Related question: I tried to
> put pkgs.kdepim into environment.systemPackages, which failed for no
> apparent reason. Then I stumbled (really, by accident) over a nix snippet
> where it said pkgs.kde4.<some-kde-subpackage> and indeed adding the .kde4
> worked. How can I find out how packages are organised in the pkgs nix
> expression?
>

You'll have to look it up in `pkgs/top-level/all-packages.nix`.
Either clone the nixpkgs repository or you can find a copy at
`/nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs`.


> (4) How do I fix something if it is broken? Note I don't want to upgrade my
> whole NixOS configuration to the unstable branch (as all the documentation
> suggests), just make one or two fixes in certain packages (e.g. the nedit
> package is currently broken, when starting the binary it crashes with some
> X11 bad opcode error). I expected the nixpkgs repository to have a 'stable'
> branch so I could check that out and work from there but such a branch
> seems
> not to exist. How else can I replace/fix/change the nix expression for a
> single package, leaving the rest of the system as is?
>

Actually, right now, using stable instead of unstable doesn't make any
sense.

That's how I modify packages:
I have a clone of the nixpkgs repository and I modify expressions there.
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.


>
> Cheers
> Ben
> --
> "Make it so they have to reboot after every typo." -- Scott Adams
>
>
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20140331/cf29a2f7/attachment-0001.html 


More information about the nix-dev mailing list