summaryrefslogtreecommitdiffstats
path: root/nixos/lib/build-vms.nix
AgeCommit message (Collapse)Author
2021-06-21nixosTest: Force system.nixos.revision constantDavid Arnold
nixos tests are blended with other system configurations, hence their settings must be either enforced or defaulted. This particular setting is set via lib.nixosSystem as `system.nixos.revision = final.mkIf (self ? rev) self.rev;` which would mean that without this change no flake generated nixos could be blended with nixos testing. This setting was made previously constant in 169c6b4b1478a3a0c823c99ea39d4082f76a2708 in order to avoid pointless rebuilds of the testing VMs, but was set without enforcing it.
2021-03-22nixosTest: Make system.nixos.revision constantRobert Hensing
Make the revision metadata constant, in order to avoid needless retesting. The human version (e.g. 21.05-pre) is left as is, because it is useful for external modules that test with e.g. nixosTest and rely on that version number.
2020-10-21nixos: fix qemu_test being used in normal VMsrnhmjoj
This is an attempt to fixup PR #49403.
2020-09-14nixos/testing: Add support for specialArgsJanne Heß
Since using flakes disallows the usage of <unstable> (which I use in some tests), this adds an alternative. By setting specialArgs, all VMs can get the `unstable` flake input as an arg. This is not possible with extraConfigurations, as that would lead to infinite recursions.
2019-08-18Merge branch 'master' into flip-map-foreachdanbst
2019-08-07Make hostname in tests overridableNikola Knezevic
The original form effectively forbade any NixOS configuration that is under test to explicitly set the hostname.
2019-08-05mass replace "flip map -> forEach"danbst
See `forEach`-introduction commit. ``` rg 'flip map ' --files-with-matches | xargs sed -i 's/flip map /forEach /g' ```
2019-08-05Revert "mass replace "flip map -> foreach""danbst
This reverts commit 3b0534310c89d04fc3a9c5714b5a4d0f9fb0efca.
2019-07-14mass replace "flip map -> foreach"danbst
See `foreach`-introduction commit. ``` rg 'flip map ' --files-with-matches | xargs sed -i 's/flip map /foreach /g' ```
2019-05-29nixos: Make nesting.children work in NixOS testsArian van Putten
We differentiate between modules and baseModules in the VM builder for NixOS tests. This way, nesting.children, eventhough it doesn't inherit from parent, still has enough config to actually complete the test. Otherwise, the qemu modules would not be loaded, for example, and a nesting.children statement would not evaluate.
2019-05-26nixos: Make 'nesting.clone' work in NixOS testsArian van Putten
Because nesting.clone calls 'eval-config.nix' manually, without the 'extraArgs' argument that provides the 'nodes' argument to nixos modules in nixos tests, evaluating of 'nesting.clone' definitions would fail with the following error while evaluating the module argument `nodes' in "<redacted>" while evaluating the attribute '_module.args.nodes' at undefined position: attribute 'nodes' missing, at <redacted./nixpkgs/lib/modules.nix:163:28 by not using 'extraArgs' but a nixos module instead, the nodes parameter gets propagated to the 'eval-config.nix' call that 'nesting.clone' makes too - getting rid of the error. See https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/system/activation/top-level.nix#L13-L23 See https://github.com/NixOS/nixpkgs/blob/master/nixos/lib/build-vms.nix#L27 See https://github.com/NixOS/nixpkgs/issues/20886#issuecomment-495952149
2018-12-07test: set machines fqdn in /etc/hostsJean-Philippe Braun
2018-11-13Add pkgs.nixosTestRobert Hensing
2018-11-11tests: refactor to carry the package set as an argumentLéo Gaspard
This way, the package set will be possible to pass without re-importing all the time
2018-09-23nixos: doc: move non-service parts of `service.nixosManual` to ↵Jan Malakhovski
`documentation.nixos`
2018-07-20[bot] nixos/*: remove unused arguments in lambdasvolth
2018-02-17nixos/networking-interfaces: rename IP addresses/routes optionsrnhmjoj
2018-01-30nixos/qemu-flags: Take a 'pkgs' parameterTuomas Tynkkynen
I'm gonna use it in the next commit.
2016-12-20Use only one build of qemu in VM testsEelco Dolstra
Previously we were using two or three (qemu_kvm, qemu_test, and qemu_test with a different dbus when minimal.nix is included). (cherry picked from commit 8bfa4ce82ea7d23a1d4c6073bcc044e6bf9c4dbe)
2016-03-29nixos/lib/testing.nix: make 'config' a free variableDomen Kožar
cc @edolstra
2015-08-05Unify NixOS and Nixpkgs channel structureEelco Dolstra
This is primarily to ensure that -I nixpkgs=https://nixos.org/channels/nixos-unstable/nixexprs.tar.xz and -I nixpkgs=https://github.com/NixOS/nixpkgs-channels/archive/nixos-unstable.tar.gz and -I nixpkgs=https://nixos.org/channels/nixpkgs-unstable/nixexprs.tar.xz behave consistently. It also allows installing packages via "nix-env -iA nixos.<pkg>" rather than "nixos.pkgs.<pkg>". It would be even better to allow "nixpkgs.<pkg>", but that requires a change to nix-channel. Fixes #7659.
2015-07-28Remove zipTwoListsEelco Dolstra
This function is redundant (we also have zipLists).
2015-02-19In a test VM it's impossible to connect to itself, so fix thisSander van der Burg
2014-08-31Revert "Revert "Fix syntax error in nixos/lib/build-vms.nix, introduced by ↵William A. Kennington III
86c0f8c"" This reverts commit 2f697bf6931b24cdd428e22effbf6427a85afd42.
2014-08-31Revert "Revert "Merge pull request #3182 from wkennington/master.ipv6""William A. Kennington III
This reverts commit ea8910652fcecbcd4f21aa1c66b1a0a239408b04.
2014-08-31Revert "Merge pull request #3182 from wkennington/master.ipv6"Rob Vermaas
This reverts commit b23fd6585481a42937e105d5fce630a549900e86, reversing changes made to 43654cba2c280ce17b81db44993d1c1bcae3a9c6.
2014-08-31Revert "Fix syntax error in nixos/lib/build-vms.nix, introduced by 86c0f8c"Rob Vermaas
This reverts commit 704e91bab005eabe968a3b140222fb0cf7afd4db.
2014-08-30Fix syntax error in nixos/lib/build-vms.nix, introduced by 86c0f8cRickard Nilsson
2014-08-30Refactor nixos files relying on the old ipAddress / prefixLength / ↵William A. Kennington III
subnetMask attributes
2013-11-26Add a regression test for hostname / nss_myhostnameEelco Dolstra
Issue #1248.
2013-10-11Terrible backward compatibility hackEelco Dolstra
2013-10-10Update the release expressions and the channel generatorsEelco Dolstra
2013-10-10Move all of NixOS to nixos/ in preparation of the repository mergeEelco Dolstra