[Nix-dev] The .nixpkgs/config.nix file and user configuration

Nawal Husnoo nawal at husnoo.com
Thu May 4 08:37:09 CEST 2017


Using that repo, I have been able to reach what I was looking for: my
system config uses configuration.nix, just for the system, and internet
facing stuff, where I really want to follow the release channel to make
sure I use the latest.

For my user stuff, I now have a config.nix:

$ cat ~/.config/nixpkgs/config.nix
# nix-env -i all
# https://github.com/kamilchm/.nixpkgs/blob/master/config.nix

with import <nixpkgs> {};

{
    allowUnfree = true;

    packageOverrides = pkgs_: with pkgs_; {
        eterm = import ./eterm {
            inherit (pkgs) stdenv fetchurl pkgconfig imlib2 libast;
            libX11 = xorg.libX11;
            libXext = xorg.libXext;
            libXaw = xorg.libXaw;
        };



        all = with pkgs; buildEnv {
            name = "all";
            paths = [
                eterm
                vlc
            ];
        };
    };
}

where the vlc is being pulled from the system channel, but the Eterm is
being built with my modified version of the original, to include the
unicode bits:

$ cat ~/data/nixos/user/eterm/default.nix
{ stdenv, fetchurl
, libX11, libXext, libXaw
, pkgconfig, imlib2, libast }:

stdenv.mkDerivation rec {
    name = "eterm-${version}";
    version = "0.9.6";
    srcName = "Eterm-${version}";

    src = fetchurl {
        url = "http://www.eterm.org/download/${srcName}.tar.gz";
        sha256 = "0g71szjklkiczxwzbjjfm59y6v9w4hp8mg7cy99z1g7qcjm0gfbj";
    };

    configureFlags = "--enable-multi-charset=utf-8";

    buildInputs = [ libX11 libXext libXaw pkgconfig imlib2 ];
    propagatedBuildInputs = [ libast ];

    meta = with stdenv.lib; {
        description = "Terminal emulator";
        homepage = "http://www.eterm.org";
        license = licenses.bsd2;
        maintainers = [ maintainers.AndersonTorres ];
        platforms = platforms.linux;
    };
}

I install all of the above with nix-env -i all, as a user - so this is, if
I understand correcly, per-user as you are seeking too. Does that make
sense?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.science.uu.nl/pipermail/nix-dev/attachments/20170504/2967f193/attachment-0001.html>


More information about the nix-dev mailing list