[Nix-dev] Moving some of the NixOS setup to nixpkgs

Shea Levy shea at shealevy.com
Fri Oct 3 15:26:26 CEST 2014


Hey all,

I've only briefly browsed through the thread, so maybe this is
repetitive, but I think whatever we do here we should separate out the
"raw" package from the tool that configures the environment for it, so
that the package can be composed in different ways without the overhead
of the wrapper or symlink tree or whatever.

~Shea

On Wed, Oct 01, 2014 at 11:11:38AM +0200, Wout Mertens wrote:
> Hi all,
> 
> TL;DR: I'd like to discuss the empty space between declarative NixOS
> systems and imperative nix-env user profiles.
> 
> 
> As we all know, nixpkgs provides compiled packages and NixOS ties them
> together with environment variables, configuration files and systemd
> services.
> 
> This dichotomy causes a bit of a problem for user environments, especially
> on nixpkgs installs outside NixOS.
> 
> Examples are the environment variables TZDIR, CURL_CA_BUNDLE,
> OPENSSL_X509_CERT_FILE and others, which are in place for NixOS users but
> not for nixpkgs users. Without these, glibc and curl don't work 100% right.
> Plain nixpkgs installs should have these set in the user environment
> somehow.
> 
> Another issue, is that configuration files are only generated for NixOS
> services. So if you as a user want to use nginx on an unprivileged port for
> development, you need to generate the configuration by hand instead of just
> specifying a port and getting a wrapper.
> 
> One more related topic is declarative user environments. You can do it [1],
> but it's a bit of a hidden feature and not very straightforward.
> 
> So I'm hoping that we can come up with a system where:
> 
>    - configuration wrappers are in nixpkgs, and NixOS modules use those.
>    - multiple configurations of a package become multiple wrappers with
>    user-definable names
>    - environment variables like TERMINFO are declared in nixpkgs instead of
>    NixOS modules and synthesized into the user environment instead of via NixOS
>    - declarative user environments are made as easy as possible. Perhaps it
>    should be the default and nix-env only edits the declaration.
> 
> Thoughts please!
> 
> Wout.
> 
> [1]:
> https://nixos.org/wiki/Howto_develop_software_on_nixos#Obtaining_an_Environment_from_a_Custom_Definition

> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev



More information about the nix-dev mailing list