]> git.scottworley.com Git - trustix-integration-tests/blob - lib/nixosTest-rebuild-switch.nix
Initial attempt at a subscriber with a local binary cache
[trustix-integration-tests] / lib / nixosTest-rebuild-switch.nix
1 # NixOS configuration that allows a nixosTest virtual machine to "nixos-rebuild switch".
2 # You'll also need to include the config's system.build.toplevel in system.extraDependencies.
3
4 { lib, pkgs, modulesPath, ... }: {
5 imports = [
6 (modulesPath + "/installer/cd-dvd/channel.nix")
7 (modulesPath + "/profiles/base.nix")
8 (modulesPath + "/testing/test-instrumentation.nix")
9 (modulesPath + "/virtualisation/qemu-vm.nix")
10 ];
11
12 nix.binaryCaches = lib.mkOverride 90 [ ];
13 nix.binaryCachePublicKeys = lib.mkOverride 90 [ ];
14 nix.extraOptions = ''
15 hashed-mirrors =
16 connect-timeout = 1
17 '';
18
19 system.extraDependencies = with pkgs; [
20 # List of packages from installer test
21 curl # To diagnose fetch requests
22 desktop-file-utils
23 docbook5
24 docbook_xsl_ns
25 grub
26 libxml2.bin
27 libxslt.bin
28 nixos-artwork.wallpapers.simple-dark-gray-bottom
29 ntp
30 perlPackages.ListCompare
31 perlPackages.XMLLibXML
32 shared-mime-info
33 stdenvNoCC
34 sudo
35 texinfo
36 unionfs-fuse
37 xorg.lndir
38 ];
39
40 # Don't try to install bootloaders in a VM
41 boot.loader.grub.devices = lib.mkForce [ "nodev" ];
42 }