[Nix-dev] Moving some of the NixOS setup to nixpkgs
Wout Mertens
wout.mertens at gmail.com
Wed Oct 1 11:11:38 CEST 2014
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20141001/48c9f97f/attachment.html
More information about the nix-dev
mailing list