[Nix-dev] Two declarative ways to install a package?

Roger Qiu roger.qiu at matrix.ai
Fri Aug 12 09:01:37 CEST 2016


For example: There are both nginx package and nginx service. The package
part is just the package management aspect of Nix, while the nginx service
is the service management (configuration management) aspect of Nix. However
if you use the service, then as a dependency, package is usually installed.
On 12/08/2016 5:11 AM, "Nick Sabalausky" <bus_nixos_list at semitwist.com>
wrote:

> I'm noticing that when installing packages declaratively via
> configuration.nix and nixos-rebuild, some packages are install one way, but
> others are installed another way. For example:
>
> # Some packages are installed via environment.systemPackages
> environment.systemPackages = with pkgs; [
>   wget firefox thunderbird git
> ];
>
> # Others are installed via *.enabled = true;
> services.openssh.enable = true;
> services.printing.enable = true;
> services.xserver.enable = true;
> services.xserver.displayManager.kdm.enable = true;
> services.xserver.desktopManager.kde4.enable = true;
> services.vmwareGuest.enable = true;
>
> What exactly is the difference? Is there any more nuance to it than
> "Services are installed one way, non-services are installed the other way"?
>
> How do I know which way to install a given package? Especially if I'm not
> sure offhand whether a given package involves a service component.
>
> Can all packages be installed wither way? Are all packages ONLY one way or
> the other?
>
> How can I find what packages are available via one method or the other?
> _______________________________________________
> 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/20160812/7fe255bd/attachment.html>


More information about the nix-dev mailing list