summary refs log tree commit diff
path: root/nixos/lib
Commit message (Collapse)AuthorAge
* Move generation of coverage reports from nixos/lib/testing to releaseToolsEelco Dolstra2014-03-03
| | | | Also, turn some stdenv adapters into setup hooks.
* Sync /tmp/xchg to ensure that the coverage data is flushedEelco Dolstra2014-03-03
|
* nixos X tests: wait for logind to link a session to the serverShea Levy2014-01-22
| | | | | | There seems to be some race causing failures if an X command gets in before slim starts the session Signed-off-by: Shea Levy <shea@shealevy.com>
* Add support for lightweight NixOS containersEelco Dolstra2013-11-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | You can now say: systemd.containers.foo.config = { services.openssh.enable = true; services.openssh.ports = [ 2022 ]; users.extraUsers.root.openssh.authorizedKeys.keys = [ "ssh-dss ..." ]; }; which defines a NixOS instance with the given configuration running inside a lightweight container. You can also manage the configuration of the container independently from the host: systemd.containers.foo.path = "/nix/var/nix/profiles/containers/foo"; where "path" is a NixOS system profile. It can be created/updated by doing: $ nix-env --set -p /nix/var/nix/profiles/containers/foo \ -f '<nixos>' -A system -I nixos-config=foo.nix The container configuration (foo.nix) should define boot.isContainer = true; to optimise away the building of a kernel and initrd. This is done automatically when using the "config" route. On the host, a lightweight container appears as the service "container-<name>.service". The container is like a regular NixOS (virtual) machine, except that it doesn't have its own kernel. It has its own root file system (by default /var/lib/containers/<name>), but shares the Nix store of the host (as a read-only bind mount). It also has access to the network devices of the host. Currently, if the configuration of the container changes, running "nixos-rebuild switch" on the host will cause the container to be rebooted. In the future we may want to send some message to the container so that it can activate the new container configuration without rebooting. Containers are not perfectly isolated yet. In particular, the host's /sys/fs/cgroup is mounted (writable!) in the guest.
* Add a regression test for hostname / nss_myhostnameEelco Dolstra2013-11-26
| | | | Issue #1248.
* Fix environment.checkConfigurationOptionsEelco Dolstra2013-10-29
| | | | | | This requires delaying the declaredness check until later, otherwise we get an infinite recursion querying environment.checkConfigurationOptions.
* Fix nixos-optionEelco Dolstra2013-10-28
| | | | | In particular, it no longer produces an "infinite recursion" error when run with no arguments.
* Check for undeclared optionsEelco Dolstra2013-10-28
|
* Big cleanup of the NixOS module systemEelco Dolstra2013-10-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The major changes are: * The evaluation is now driven by the declared options. In particular, this fixes the long-standing problem with lack of laziness of disabled option definitions. Thus, a configuration like config = mkIf false { environment.systemPackages = throw "bla"; }; will now evaluate without throwing an error. This also improves performance since we're not evaluating unused option definitions. * The implementation of properties is greatly simplified. * There is a new type constructor "submodule" that replaces "optionSet". Unlike "optionSet", "submodule" gets its option declarations as an argument, making it more like "listOf" and other type constructors. A typical use is: foo = mkOption { type = type.attrsOf (type.submodule ( { config, ... }: { bar = mkOption { ... }; xyzzy = mkOption { ... }; })); }; Existing uses of "optionSet" are automatically mapped to "submodule". * Modules are now checked for unsupported attributes: you get an error if a module contains an attribute other than "config", "options" or "imports". * The new implementation is faster and uses much less memory.
* Add a way to define obsolete options that have no replacementEelco Dolstra2013-10-23
|
* Fix runInMachineEelco Dolstra2013-10-16
| | | | | | | | It requires a writable /nix/store to store the build result. Also, wait until we've reached multi-user.target before doing the build, and do a sync at the end to ensure all data to $out is properly written. http://hydra.nixos.org/build/6496716
* Terrible backward compatibility hackEelco Dolstra2013-10-11
|
* Update the release expressions and the channel generatorsEelco Dolstra2013-10-10
|
* Move all of NixOS to nixos/ in preparation of the repository mergeEelco Dolstra2013-10-10