Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions tests/hetzner-backend.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ let
];

networking.useDHCP = false;
networking.firewall.enable = false;

# We don't want to include everything from qemu-vm.nix,
# so we're going to just pick the options we need (and
Expand Down Expand Up @@ -241,9 +242,9 @@ let
] ++ (qemuNICFlags 1 1 (builtins.add targetId 1));
in concatStringsSep " " flags;

in makeTest ({ pkgs, ... }:
{
in makeTest {
nodes.coordinator = {
networking.firewall.enable = false;
environment.systemPackages = let
testNixops = overrideDerivation nixops (o: {
postPatch = ''
Expand All @@ -261,7 +262,7 @@ in makeTest ({ pkgs, ... }:
# ... and this is for other requirements for a basic deployment.
pkgs.stdenv pkgs.busybox pkgs.module_init_tools pkgs.grub2
pkgs.xfsprogs pkgs.btrfsProgs pkgs.docbook_xsl_ns pkgs.libxslt
pkgs.docbook5 pkgs.ntp
pkgs.docbook5 pkgs.ntp pkgs.perlPackages.ArchiveCpio
# Firmware used in <nixpkgs/nixos/modules/installer/scan/not-detected.nix>
pkgs.firmwareLinuxNonfree
];
Expand Down Expand Up @@ -367,4 +368,4 @@ in makeTest ({ pkgs, ... }:
$target2->succeed("mount | grep -F 'on / type btrfs'");
};
'';
})
}
15 changes: 9 additions & 6 deletions tests/none-backend.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
with import <nixpkgs/nixos/lib/testing.nix> { inherit system; };
with pkgs.lib;

makeTest ({ pkgs, ... }:

let

# Physical NixOps model.
physical = pkgs.writeText "physical.nix"
''
Expand Down Expand Up @@ -38,6 +35,7 @@ let
target1 =
{ config, pkgs, ... }:
{ services.openssh.enable = true;
networking.firewall.enable = false;
users.extraUsers.root.openssh.authorizedKeys.keyFiles = [ ./id_test.pub ];
${optionalString (n == 1) ''
environment.systemPackages = [ pkgs.vim ];
Expand All @@ -63,6 +61,7 @@ let
target2 =
{ config, pkgs, ... }:
{ services.openssh.enable = true;
networking.firewall.enable = false;
users.extraUsers.root.openssh.authorizedKeys.keyFiles = [ ./id_test.pub ];
${optionalString (n == 3) ''
services.httpd.enable = true;
Expand All @@ -76,13 +75,15 @@ let

in

{
makeTest {

nodes =
{ coordinator =
{ config, pkgs, ... }:
{ environment.systemPackages =
[ nixops pkgs.stdenv pkgs.vim pkgs.apacheHttpd pkgs.busybox pkgs.module_init_tools ];
[ nixops pkgs.stdenv pkgs.vim pkgs.apacheHttpd pkgs.busybox
pkgs.module_init_tools pkgs.perlPackages.ArchiveCpio ];
networking.firewall.enable = false;
virtualisation.writableStore = true;
};

Expand All @@ -91,6 +92,7 @@ in
{ services.openssh.enable = true;
virtualisation.memorySize = 512;
virtualisation.writableStore = true;
networking.firewall.enable = false;
users.extraUsers.root.openssh.authorizedKeys.keyFiles = [ ./id_test.pub ];
};

Expand All @@ -99,6 +101,7 @@ in
{ services.openssh.enable = true;
virtualisation.memorySize = 512;
virtualisation.writableStore = true;
networking.firewall.enable = false;
users.extraUsers.root.openssh.authorizedKeys.keyFiles = [ ./id_test.pub ];
};
};
Expand Down Expand Up @@ -176,4 +179,4 @@ in

'';

})
}