about summary refs log tree commit diff
path: root/nixos/lib
Commit message (Collapse)AuthorAge
* nixos: compress squashfs with xzFranz Pletz2016-11-23
|
* nixos/lib/testing: Fix unsetting $xchgaszlig2016-09-11
| | | | | | | | | | | | Regression introduced by 4dcb685af940efd74a7b2b66ae917129ef232d83. Unsetting the environment variable shortly before using it is not going to end up very well, so let's just filter out the variable from the output of export and unset it shortly afterwards. This fixes the runInMachine NixOS test. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
* runInMachine: Unset another variableEelco Dolstra2016-09-09
| | | | Thanks @cstrahan.
* runInMachine: Support passAsFileEelco Dolstra2016-09-08
| | | | | We need to rewrite attributes passed via files to their location in /tmp/xchg in the VM. Otherwise functions like runCommand don't work.
* nixos: generalize copy-paste from stage-1 and zfs to utilsJan Malakhovski2016-08-23
|
* nixos: apply toposort to fileSystems to support bind and move mountsJan Malakhovski2016-08-23
| | | | And use new `config.system.build.fileSystems` property everywhere.
* treewide: Use more makeBinPathTuomas Tynkkynen2016-08-23
|
* nixos/lib/make-disk-image: refactor to use nixos-installobadz2016-08-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Replace hand-rolled version of nixos-install in make-disk-image by an actual call to nixos-install - Required a few cleanups of nixos-install - nixos-install invokes an activation script which the hand-rolled version in make-disk-image did not do. We remove /etc/machine-id as that's a host-specific, impure, output of the activation script Testing: nix-build '<nixpkgs/nixos/release.nix>' -A tests.installer.simple passes Also tried generating an image with: nix-build -E 'let pkgs = import <nixpkgs> {}; lib = pkgs.lib; nixos = import <nixpkgs/nixos> { configuration = { fileSystems."/".device = "/dev/disk/by-label/nixos"; boot.loader.grub.devices = [ "/dev/sda" ]; boot.loader.grub.extraEntries = '"''"' menuentry "Ubuntu" { insmod ext2 search --set=root --label ubuntu configfile /boot/grub/grub.cfg } '"''"'; }; }; in import <nixpkgs/nixos/lib/make-disk-image.nix> { inherit pkgs lib; config = nixos.config; diskSize = 2000; partitioned = false; installBootLoader = false; }' Then installed the image: $ sudo df if=./result/nixos.img of=/dev/sdaX bs=1M $ sudo resize2fs /dev/disk/by-label/nixos $ sudo mount /dev/disk/by-label/nixos /mnt $ sudo mount --rbind /proc /mnt/proc $ sudo mount --rbind /dev /mnt/dev $ sudo chroot /mnt /nix/var/nix/profiles/system/bin/switch-to-configuration boot [ … optionally do something about passwords … ] and successfully rebooted to that image. Was doing all this from inside a Ubuntu VM with a single user nix install.
* nixos/make-disk-image: add ability to defer bootloader install until image ↵obadz2016-08-15
| | | | has been flashed
* nixos: throw an error on invalid shell packagezimbatm2016-07-04
| | | | All shell packages must export the shellPath passthru
* Merge 'master' into staging and re-revert mergeVladimír Čunát2016-06-23
|\ | | | | | | ... from staging to master, reverted temporarily in aa9a04883e34.
| * Revert "Merge branch 'staging'" due to glibcVladimír Čunát2016-06-23
| | | | | | | | | | | | | | | | The main output started to retain dependency on bootstrap-tools; see https://github.com/NixOS/nixpkgs/pull/15867#issuecomment-227949096 This reverts commit c05d8295988697adbb920a7b4a999ae3670c5504, reversing changes made to f073df60d60444c30c49cb26d6b187a4100b41fe.
| * Merge branch 'staging'Vladimír Čunát2016-06-22
| |\ | |/ |/|
| * Use shell packages to select the user's shellzimbatm2016-06-12
| | | | | | | | The string type is still available for backward-compatiblity.
* | make-wrapper: fixup #14753 changes to make tests workVladimír Čunát2016-06-19
|/ | | | | | | The tests need to expand passed variable and very carefully. I could see no other easy way than to change single-quoting in makeWrapper to double-quoting. The tests now fail with the same problem as on master...
* nixos/test-driver/Logger: Replace invalid UTF-8aszlig2016-05-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Regression introduced by d84741a4bfb6ed2531ec7154479c147d2c9a737c. The mentioned commit actually is a good thing, because we now get the output from the X session. Unfortunately, for the i3wm test, the i3-config-wizard prints out the raw keyboard symbols directly coming from xcb, so the output isn't necessarily proper UTF-8. As the XML::Writer already expects valid UTF-8 input, we assume that everything that comes into sanitise() will be UTF-8 from the start. So we just decode() it using FB_DEFAULT as the check argument so that every invalid character is replaced by the unicode replacement character: https://en.wikipedia.org/wiki/Specials_(Unicode_block)#Replacement_character We simply re-oncode it again afterwards and return it, so we should always get out valid UTF-8 in the log XML. For more information about FB_DEFAULT and FB_CROAK, have a look at: http://search.cpan.org/~dankogai/Encode-2.84/Encode.pm#Handling_Malformed_Data Signed-off-by: aszlig <aszlig@redmoonstudios.org>
* test-driver: Fix "unit X is inactive and there are no pending jobs"Eelco Dolstra2016-05-24
| | | | This was causing many random test failures.
* treewide: Use correct output in ${config.nix.package}/binTuomas Tynkkynen2016-04-25
|
* Fix X11 tests broken by the removal of -acEelco Dolstra2016-04-12
| | | | | Probably missed a few. Also adding xauth to the system path (it was already in the closure).
* Fix the EC2 testEelco Dolstra2016-03-30
| | | | | | | We now generate a qcow2 image to prevent hitting Hydra's output size limit. Also updated /root/user-data -> /etc/ec2-metadata/user-data. http://hydra.nixos.org/build/33843133
* nixos/lib/testing.nix: make 'config' a free variableDomen Kožar2016-03-29
| | | | cc @edolstra
* Combine ISO generation stepsEelco Dolstra2016-03-15
| | | | | This folds adding hydra-build-products into the actual ISO generation, preventing an unnecessary download of the ISO.
* Combine OVA generation stepsEelco Dolstra2016-03-15
| | | | | | | | Previously this was done in three derivations (one to build the raw disk image, one to convert to OVA, one to add a hydra-build-products file). Now it's done in one step to reduce the amount of copying to/from S3. In particular, not uploading the raw disk image prevents us from hitting hydra-queue-runner's size limit of 2 GiB.
* wheter → whetherProfpatsch2016-03-07
| | | | Nice weather today, isn’t it?
* Revert "Add the tool "nixos-typecheck" that can check an option declaration to:"Eelco Dolstra2016-03-01
| | | | | | This reverts commit cad8957eabcbf73062226d28366fd446c15c8737. It breaks NixOps, but more importantly, such major changes to the module system really need to be reviewed.
* Add the tool "nixos-typecheck" that can check an option declaration to:Thomas Strobel2016-02-29
| | | | | | | | | | | | | | - Enforce that an option declaration has a "defaultText" if and only if the type of the option derives from "package", "packageSet" or "nixpkgsConfig" and if a "default" attribute is defined. - Enforce that the value of the "example" attribute is wrapped with "literalExample" if the type of the option derives from "package", "packageSet" or "nixpkgsConfig". - Warn if a "defaultText" is defined in an option declaration if the type of the option does not derive from "package", "packageSet" or "nixpkgsConfig". - Warn if no "type" is defined in an option declaration.
* waitForUnit: Fail if the unit reaches inactive state with no pending jobsEelco Dolstra2015-12-30
| | | | | This prevents waitForUnit for looping for many minutes before giving up.
* Enable to create hybrid ISO without UEFI bootTimofei Kushnir2015-11-28
|
* nova-image: use make-disk-image.nixDomen Kožar2015-10-26
|
* Give more memory for the disk image builderEelco Dolstra2015-10-06
| | | | http://hydra.nixos.org/build/26480662
* Fix Nix database in generated imagesEelco Dolstra2015-09-28
| | | | | | This prevents seeing lots of warnings about missing hashes/sizes in the database when running "nix-store --verify --check-contents" for the first time.
* Use make-disk-image.nix for VirtualBox imagesEelco Dolstra2015-09-28
|
* Update AMI generatorEelco Dolstra2015-09-27
| | | | | | | | | The EBS and S3 (instance-store) AMIs are now created from the same image. HVM instance-store AMIs are also generated. Disk image generation has been factored out into a function (nixos/lib/make-disk-image.nix) that can be used to build other kinds of images.
* nixos: move left-behind allowUnfree commentTobias Geerinckx-Rice2015-09-03
|
* Prefer local build for the test driver scriptEelco Dolstra2015-08-26
|
* Update option-usages.nix expression to work with newer version of the module ↵Nicolas B. Pierron2015-08-09
| | | | system.
* Unify NixOS and Nixpkgs channel structureEelco Dolstra2015-08-05
| | | | | | | | | | | | | | | | | | | | | | 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.
* nixUnstable: Update to 1.10pre4200_76cc8e9Eelco Dolstra2015-07-30
| | | | Also unify the nixStable and nixUnstable expressions.
* Merge pull request #8978 from dezgeg/pr-arm-imagesviric2015-07-29
|\ | | | | ARM SD card image expressions
| * nixos: Add derivations for SD card installation images on ARMTuomas Tynkkynen2015-07-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The resulting image can be copied to a SD card with `dd` and is directly bootable by a suitably configured U-Boot. Though depending on the board, some extra steps are required for copying U-Boot itself to the SD card. Inside the image is a partition table, with a FAT32 /boot and a normal writable EXT4 rootfs. It's possible to directly reuse the SD image's partition layout and "install" NixOS on the same SD card by replacing the default configuration.nix and nixos-rebuild, and actually is the preferred way to use these images. To assist in this installation method, the boot scripts on the image automatically resize the rootfs partition to fit the SD card on the first boot. The SD images come in two flavors; one for the ARMv6 Raspberry Pi, and one multiplatform image for all the boards supported by the mainline kernel's multi_v7_defconfig config target. At the moment, these have been tested on: - Raspberry Pi Model B (512MB model) - NVIDIA Jetson TK1 - Linksprite pcDuino3 Nano To build, run: nix-build '<nixpkgs/nixos>' -A config.system.build.sdImage \ -I nixos-config='<nixpkgs/nixos/modules/installer/cd-dvd/sd-image-armv7l-multiplatform.nix>'
* | Remove zipTwoListsEelco Dolstra2015-07-28
|/ | | | This function is redundant (we also have zipLists).
* all tests: added meta.maintainers sectionJoachim Schiele2015-07-12
|
* Factor the NixOS channel building code out into its own file, so I can use ↵Dan Peebles2015-06-13
| | | | it elsewhere
* Simple EC2 user-data VM testDan Peebles2015-06-11
|
* Merge pull request #8204 from copumpkin/modulesPathDaniel Peebles2015-06-10
|\ | | | | An importable modulesPath, once again
| * Bring an importable modulesPath back from the dead, in the only way I knowDan Peebles2015-06-08
| |
* | Drop obsolete boot=on parameterEelco Dolstra2015-06-10
|/
* nixos/test-driver: Fix bashism in Machine.pm.aszlig2015-05-22
| | | | | | Thanks to @bjornfor for the note. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
* nixos/testing: Use stripped down tesseract only.aszlig2015-05-22
| | | | | | | Only include the English language for the VM tests, because we most likely won't need other languages. At least for now. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
* nixos/test-driver: Make tesseract OCR optional.aszlig2015-05-22
| | | | | | | | | | | | | | | | | By default this is now enabled, and it has to be explicitely enabled using "enableOCR = true". If it is set to false, any usage of getScreenText or waitForText will fail with an error suggesting to pass enableOCR. This should get rid of the rather large dependency on tesseract which we don't need for most tests. Note, that I'm using system("type -P") here to check whether tesseract is in PATH. I know it's a bashism but we already have other bashisms within the test scripts and we also run it with bash, so IMHO it's not a problem here. Signed-off-by: aszlig <aszlig@redmoonstudios.org>