[Nix-dev] Configuring Packages installed with `nix-env` is impossible?

Roger Qiu roger.qiu at polycademy.com
Mon Jul 21 06:30:33 CEST 2014


Hello,

The NixOS manual specifies 2 ways of installing packages, the 
declarative style through configuration.nix + nixos-rebuild switch, or 
the per-user style via `nix-env -i`.

While you can configure the package options inside configuration.nix, 
how does one configure packages when they are installed on a per-user style.

For example if I install NGINX or PHP with `nix-env -i nginx` or 
`nix-env -i php`, I get NGINX and PHP on my particular `~/.nix-profile`.

How do I change the configuration inside nginx.conf or php.ini or 
php-fpm.ini?

There doesn't seem to be any way to do so. The `~/.nix-profile` is 
read-only.

What if there was a per-user configuration.nix which was able to 
actually configure the packages, or maybe the options could be specified 
on the command line as part of `nix-env`.

Otherwise, there doesn't seem to be any way of effectively using 
complicated packages on a per-user basis such NGINX, Apache, PHP and 
every other package that requires configuration.

Thanks,
Roger


More information about the nix-dev mailing list