summary refs log tree commit diff
path: root/nixos/lib
Commit message (Collapse)AuthorAge
* Merge pull request #44439 from Ekleog/meta-testsTimo Kaufmann2018-11-07
|\ | | | | [RFC] Use `meta.tests` to link from packages to the tests that test them
| * dovecot, opensmtpd: add link to test in `meta.tests`Léo Gaspard2018-10-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rationale --------- Currently, tests are hard to discover. For instance, someone updating `dovecot` might not notice that the interaction of `dovecot` with `opensmtpd` is handled in the `opensmtpd.nix` test. And even for someone updating `opensmtpd`, it requires manual work to go check in `nixos/tests` whether there is actually a test, especially given not so many packages in `nixpkgs` have tests and this is thus most of the time useless. Finally, for the reviewer, it is much easier to check that the “Tested via one or more NixOS test(s)” has been checked if the file modified already includes the list of relevant tests. Implementation -------------- Currently, this commit only adds the metadata in the package. Each element of the `meta.tests` attribute is a derivation that, when it builds successfully, means the test has passed (ie. following the same convention as NixOS tests). Future Work ----------- In the future, the tools could be made aware of this `meta.tests` attribute, and for instance a `--with-tests` could be added to `nix-build` so that it also builds all the tests. Or a `--without-tests` to build without all the tests. @Profpatsch described in his NixCon talk such systems. Another thing that would help in the future would be the possibility to reasonably easily have cross-derivation nix tests without the whole NixOS VM stack. @7c6f434c already proposed such a system. This RFC currently handles none of these concerns. Only the addition of `meta.tests` as metadata to be used by maintainers to remember to run relevant tests.
* | Revert "NixOS tests: Wait for shell for 10x longer (50m)"Sarah Brofeldt2018-11-05
| | | | | | | | This reverts commit 9bc10e12916979c5c620be5b521b9218a0077cba.
* | Merge pull request #47679 from NixOS/docs-make-channelMatthew Bauer2018-11-04
|\ \ | | | | | | Document make-channel.nix
| * | Remove incorrect sentence from make-channel commentRobert Hensing2018-11-04
| | | | | | | | | | | | | | | Besides being incorrect, claims like these tend to stick around after they become incorrect.
| * | Document make-channel.nixLinus Heckemann2018-10-02
| |/
* | NixOS tests: Wait for shell for 10x longer (50m)Sarah Brofeldt2018-10-30
| |
* | Merge pull request #49401 from aherrmann/stringify-modules-pathEelco Dolstra2018-10-29
|\ \ | |/ |/| nixos/lib/eval-config.nix: toString modulesPath
| * nixos/lib/eval-config.nix: toString modulesPathAndreas Herrmann2018-10-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Referencing modulesPath in NixOS configurations can cause evaluation errors in restricted mode. If used as `${modulesPath}` (as in all use-sites in nixpkgs) the modules subtree is copied into its own store path. Access to this path will be forbidden in restricted mode. Converting to a string solves this issue. `${builtins.toString modulesPath}` will point to a subdirectory of the nixpkgs tree out of which evalModules is called. This change converts modulesPath to a string by default so that the call-site doesn't have to anymore.
* | Add ssh backdoor to VM tests infrastructure.Tuomas Tynkkynen2018-09-28
| | | | | | | | | | Thanks to @dezgeg for prototype implementation, I've cleaned it up and added documentation.
* | nixos: doc: move non-service parts of `service.nixosManual` to ↵Jan Malakhovski2018-09-23
| | | | | | | | `documentation.nixos`
* | Merge pull request #46341 from obsidiansystems/fix-46320Graham Christensen2018-09-08
|\ \ | | | | | | nixpkgs module: Fix defaulting of `localSystem` and `system`
| * | nixpkgs module: Fix defaulting of `localSystem` and `system`John Ericson2018-09-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Take two of #40708 (4fe289860888668956b7e79e24efeb101c2f51d1). That PR attempted to bidirectionally default `config.nixpkgs.system` and `config.nixpkgs.localSystem.system` to each be updated by the other. But this is not possible with the way the module system works. Divergence in certain cases in inevitable. This PR is more conservative and just has `system` default `localSystem` and `localSystem` make the final call as-is. This solves a number of issues. - `localSystem` completely overrides `system`, just like with nixpkgs proper. There is no need to specify `localSystem.system` to clobber the old system. - `config.nixpkgs.localSystem` is exactly what is passed to nixpkgs. No spooky steps. - `config.nixpkgs.localSystem` is elaborated just as nixpkgs would so that all attributes are available, not just the ones the user specified. The remaining issue is just that `config.nixpkgs.system` doesn't update based on `config.nixpkgs.localSystem.system`. It should never be referred to lest it is a bogus stale value because `config.nixpkgs.localSystem` overwrites it. Fixes #46320
* | | Merge branch 'no-toPath'Shea Levy2018-09-06
|\ \ \ | |/ / |/| |
| * | treewide: Remove uses of builtins.toPath.Shea Levy2018-05-22
| | | | | | | | | | | | | | | | | | | | | | | | toPath has confusing semantics and is never necessary; it can always either just be omitted or replaced by pre-concatenating `/.`. It has been marked as "!!! obsolete?" for more than 10 years in a C++ comment, hopefully removing it will let us properly deprecate and, eventually, remove it.
* | | reewide: Purge all uses `stdenv.system` and top-level `system`John Ericson2018-08-30
| | | | | | | | | | | | It is deprecated and will be removed after 18.09.
* | | Merge pull request #43736 from volth/patch-208xeji2018-08-26
|\ \ \ | | | | | | | | qemu: 2.12.1 -> 3.0.0
| * | | qemu: 2.12.1 -> 3.0.0volth2018-08-20
| | | |
* | | | make-ext4-fs: Fix cross compilingWill Fancher2018-08-21
|/ / /
* | | [bot] nixos/*: remove unused arguments in lambdasvolth2018-07-20
| | |
* | | sdImage: make partition ID/UUID configurableAndrew Dunham2018-07-12
| | |
* | | qemu-flags: default to qemu-kvmMatthew Bauer2018-05-31
|/ / | | | | | | | | | | this is the "generic" version & should work everywhere. also add darwin case
* | nixos/lib/make-ext4-fs: Add a sanity checkTuomas Tynkkynen2018-05-05
| | | | | | | | | | | | | | | | | | I ended up with a corrupted image with the debugfs contraption once, and given I couldn't reproduce the problem I suppose that happens if the filesystem of the builder runs out of space. At least in this instance fsck could detect it, so let's add it as a sanity check.
* | nixos/tests: Fix QEMU flags for SCSI disksaszlig2018-04-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ability to specify "-drive if=scsi" has been removed in QEMU version 2.12 (introduced in 3e3b39f173f9abc99da84084a1f4657c9de885bd). Quote from https://wiki.qemu.org/ChangeLog/2.12#Incompatible_changes: > The deprecated way of configuring SCSI devices with "-drive if=scsi" > on x86 has been removed. Use an appropriate SCSI controller together > "-device scsi-hd" or "-device scsi-cd" and a corresponding "-blockdev" > parameter instead. So whenever the diskInterface is "scsi" we use the new way to specify the drive and fall back to the deprecated way for the time being. The reason why I'm not using the new way for "virtio" and "ide" as well is because there is no simple generic way anymore to specify these. This also turns the type of the virtualisation.qemu.diskInterface option to be an enum, so the user knows which values are allowed but we can also make sure the right value is provided to prevent typos. I've tested this against a few non-disk-related NixOS VM tests but also the installer.grub1 test (because it uses "ide" as its drive interface), the installer.simple test (just to be sure it still works with "virtio") and all the tests in nixos/tests/boot.nix. In order to be able to run the grub1 test I had to go back to 8b1cf100cd8badad6e1b6d4650b904b88aa870db (which is a known commit where that test still works) and apply the QEMU update and this very commit, because right now the test is broken. Apart from the tests here in nixpkgs, I also ran another[1] test in another repository which uses the "scsi" disk interface as well (in comparison to most of the installer tests, this one actually failed prior to this commit). All of them now succeed. [1]: https://github.com/openlab-aux/vuizvui/blob/9b5a119972e9c2d327500638d89063f4fce243ec/tests/system/kernel/bfq.nix Signed-off-by: aszlig <aszlig@nix.build> Cc: @edostra, @grahamc, @dezgeg, @abbradar, @ts468
* | treewide: isArm -> isAarch32John Ericson2018-04-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Following legacy packing conventions, `isArm` was defined just for 32-bit ARM instruction set. This is confusing to non packagers though, because Aarch64 is an ARM instruction set. The official ARM overview for ARMv8[1] is surprisingly not confusing, given the overall state of affairs for ARM naming conventions, and offers us a solution. It divides the nomenclature into three levels: ``` ISA: ARMv8 {-A, -R, -M} / \ Mode: Aarch32 Aarch64 | / \ Encoding: A64 A32 T32 ``` At the top is the overall v8 instruction set archicture. Second are the two modes, defined by bitwidth but differing in other semantics too, and buttom are the encodings, (hopefully?) isomorphic if they encode the same mode. The 32 bit encodings are mostly backwards compatible with previous non-Thumb and Thumb encodings, and if so we can pun the mode names to instead mean "sets of compatable or isomorphic encodings", and then voilà we have nice names for 32-bit and 64-bit arm instruction sets which do not use the word ARM so as to not confused either laymen or experienced ARM packages. [1]: https://developer.arm.com/products/architecture/a-profile
* | Merge pull request #38485 from obsidiansystems/nixos-nixpkgs-optionsJohn Ericson2018-04-19
|\ \ | | | | | | nixpkgs module: Clean up platform options
| * | nixpkgs module: Clean up platform optionsJohn Ericson2018-04-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - `localSystem` is added, it strictly supercedes system - `crossSystem`'s description mentions `localSystem` (and vice versa). - No more weird special casing I don't even understand TEMP
* | | Merge branch 'master' into stagingRobert Schütz2018-04-10
|\ \ \
| * | | nixos/make-ext4-fs: Use closureInfoTuomas Tynkkynen2018-04-10
| |/ / | | | | | | | | | | | | | | | exportReferencesGraph is deprecated and doesn't have the generated initial Nix database contain the SHA256 of the contents of the store paths, which breaks various things under Nix 2.0.
* | | Merge master into stagingFrederik Rietdijk2018-04-04
|\| |
| * | make-system-tarball: allow alternate compression methodsMichael Bishop2018-04-03
| | |
* | | Machine.pm: tweak to look for graphical target in waitForXWill Dietz2018-04-03
| | | | | | | | | | | | | | | | | | Current message may not be printed (nothing in systemd contains that string, it comes from elsewhere)
* | | nixos testing: significantly reduce deps needed for OCR testsWill Dietz2018-03-31
|/ / | | | | | | | | | | Instead of imagemagick built with many libraries (notably librsvg which these days requires rust) use imagemagick_light with support for libtiff added.
* | Merge pull request #35844 from adisbladis/jquery-mvadisbladis2018-03-06
|\ \ | | | | | | jquery & jquery-ui: Move to nixos/lib/testing/
| * | jquery & jquery-ui: Move to nixos/lib/testing/adisbladis2018-02-27
| | | | | | | | | | | | | | | | | | | | | These (outdated) derivations are only used by nixos/lib/testing.nix. If we want to provide jquery & jquery-ui packages this is better done in nodePackages.
* | | Fix installing the Nixpkgs channel on the installation mediaEelco Dolstra2018-02-27
| | | | | | | | | | | | And test that it got installed correctly.
* | | Merge remote-tracking branch 'origin/master' into nix-2.0Eelco Dolstra2018-02-22
|\| |
| * | Document the makeTest length restrictionMichael Fellinger2018-02-20
| | |
| * | Only allow test names of up to 50 charactersMichael Fellinger2018-02-20
| | |
| * | Merge pull request #34795 from oxij/os/nixosLabel-pt2Michael Raskin2018-02-19
| |\ \ | | | | | | | | nixos: labels part 2
| | * | nixos: rename config.system.nixos* -> config.system.nixos.*Jan Malakhovski2018-02-18
| | | |
| * | | nixos/networking-interfaces: rename IP addresses/routes optionsrnhmjoj2018-02-17
| |/ /
| * | nixos/testing: use the same qemu in the test driverFranz Pletz2018-02-11
| | | | | | | | | | | | The qemu_test package is also used for running a NixOS qemu VM.
* | | make-disk-image.nix: Use nixos-install againEelco Dolstra2018-02-07
| | | | | | | | | | | | | | | Since nixos-install doesn't require any special privileges anymore, this Just Works. No more need for fakeroot / nixos-prepare-root.
* | | ISO images: Initialize the Nix database with correct NAR hashes/sizesEelco Dolstra2018-02-07
|/ / | | | | | | | | The boot test now runs "nix verify" to ensure that all hashes are correct.
* | Add setFunctionArgs lib function.Shea Levy2018-01-31
| | | | | | | | | | | | Among other things, this will allow *2nix tools to output plain data while still being composable with the traditional callPackage/.override interfaces.
* | runInLinuxVM: Use QEMU command line that works on other architecturesTuomas Tynkkynen2018-01-30
| | | | | | | | | | ... by moving the existing definition to qemu-flags.nix and reusing that.
* | nixos/qemu: Deduplicate QEMU serialDevice into qemu-flags.nixTuomas Tynkkynen2018-01-30
| |
* | nixos/qemu-flags: Take a 'pkgs' parameterTuomas Tynkkynen2018-01-30
| | | | | | | | I'm gonna use it in the next commit.
* | nixos/make-disk-image.nix: Support EFI imagesTuomas Tynkkynen2018-01-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add a new parameter `imageType` that can specify either "efi" or "legacy" (the default which should see no change in behaviour by this patch). - EFI images get a GPT partition table (instead of msdos) with a mandatory ESP partition (so we add an assert that `partitioned` is true). - Use the partx tool from util-linux to determine exact start + size of the root partition. This is required because GPT stores a secondary partition table at the end of the disk, so we can't just have mkfs.ext4 create the filesystem until the end of the disk. - (Unrelated to any EFI changes) Since we're depending on the `-E offset=X` option to mkfs which is only supported by e2fsprogs, disallow any attempts of creating partitioned disk images where the root filesystem is not ext4.