What does a module do in NixOS system?

What does a module do in NixOS system?

Module Modules are files combined by NixOS to produce the full system configuration. A module contains a Nix expression. It declares options for other modules to define (give a value).

When to use builtins or filter in NixOS?

To add a file with fixed name (when the input filename is not stable), or to add entire directories with filter, you can use builtins.path : The following snippet will build the system from a git checkout: This method can be used when testing nixos services for a pull request to nixpkgs.

How to install the latest version of NixOS?

Download NixOS 15.09.336.83cc494x86_64 minimal install ISO. (I first tried the latest stable release, 14.12, and had an error installing Grub. I switched to this particular build of NixOS 15.09 on Domen Kožar’s recommendation.) Load it onto a flash drive using unetbootin.

How to evaluate configuration.nix without building it?

If you only want to evaluate `configuration.nix` without building (e.g. to syntax-check or see if you are using module options correctly), you can use: This creates the `.drv` file that `nixos-rebuild build` would build.

Where can I find the Nix package manager?

Additional information regarding the Nix package manager and the Nixpkgs project can be found in respectively the Nix manual and the Nixpkgs manual . If you encounter problems, please report them on the Discourse or on the #nixos channel on Freenode. Bugs should be reported in NixOS’ GitHub issue tracker .

How do I import a module into Nix?

If configuration.nix has to accommodate both variants, options can be inspected: To import a module that’s stored somewhere (but for which you have neither an absolute nor a relative path), you can use NIX_PATH elements or specialArgs from nixos/lib/eval-config.nix .

Where can I get a running NixOS system?

As an alternative to installing NixOS yourself, you can get a running NixOS system through several other means: Using virtual appliances in Open Virtualization Format (OVF) that can be imported into VirtualBox. These are available from the NixOS download page .