about summary refs log tree commit diff
path: root/nixos/tests
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/tests')
-rw-r--r--nixos/tests/airsonic.nix4
-rw-r--r--nixos/tests/all-tests.nix5
-rw-r--r--nixos/tests/cage.nix1
-rw-r--r--nixos/tests/cagebreak.nix1
-rw-r--r--nixos/tests/cassandra.nix1
-rw-r--r--nixos/tests/ceph-multi-node.nix1
-rw-r--r--nixos/tests/ceph-single-node-bluestore.nix1
-rw-r--r--nixos/tests/ceph-single-node.nix1
-rw-r--r--nixos/tests/common/wayland-cage.nix1
-rw-r--r--nixos/tests/containers-bridge.nix1
-rw-r--r--nixos/tests/containers-ephemeral.nix1
-rw-r--r--nixos/tests/containers-extra_veth.nix1
-rw-r--r--nixos/tests/containers-hosts.nix1
-rw-r--r--nixos/tests/containers-imperative.nix1
-rw-r--r--nixos/tests/containers-ip.nix1
-rw-r--r--nixos/tests/containers-macvlans.nix2
-rw-r--r--nixos/tests/containers-physical_interfaces.nix4
-rw-r--r--nixos/tests/containers-portforward.nix1
-rw-r--r--nixos/tests/containers-tmpfs.nix1
-rw-r--r--nixos/tests/custom-ca.nix2
-rw-r--r--nixos/tests/enlightenment.nix1
-rw-r--r--nixos/tests/fcitx/default.nix1
-rw-r--r--nixos/tests/fenics.nix1
-rw-r--r--nixos/tests/firefox.nix3
-rw-r--r--nixos/tests/gerrit.nix1
-rw-r--r--nixos/tests/gnome-xorg.nix1
-rw-r--r--nixos/tests/gnome.nix1
-rw-r--r--nixos/tests/graphite.nix1
-rw-r--r--nixos/tests/hadoop/hadoop.nix2
-rw-r--r--nixos/tests/hadoop/hdfs.nix1
-rw-r--r--nixos/tests/installed-tests/fwupd.nix1
-rw-r--r--nixos/tests/installer.nix2
-rw-r--r--nixos/tests/jitsi-meet.nix1
-rw-r--r--nixos/tests/kafka.nix1
-rw-r--r--nixos/tests/keycloak.nix1
-rw-r--r--nixos/tests/lxd-image.nix2
-rw-r--r--nixos/tests/metabase.nix1
-rw-r--r--nixos/tests/mysql/mysql.nix4
-rw-r--r--nixos/tests/networking-proxy.nix1
-rw-r--r--nixos/tests/nginx-etag.nix1
-rw-r--r--nixos/tests/nixops/default.nix1
-rw-r--r--nixos/tests/opensmtpd-rspamd.nix1
-rw-r--r--nixos/tests/pam/pam-file-contents.nix25
-rw-r--r--nixos/tests/pam/pam-oath-login.nix (renamed from nixos/tests/pam-oath-login.nix)2
-rw-r--r--nixos/tests/pam/pam-u2f.nix (renamed from nixos/tests/pam-u2f.nix)2
-rw-r--r--nixos/tests/pam/test_chfn.py27
-rw-r--r--nixos/tests/pantheon.nix1
-rw-r--r--nixos/tests/paperless-ng.nix1
-rw-r--r--nixos/tests/plasma5-systemd-start.nix1
-rw-r--r--nixos/tests/plasma5.nix1
-rw-r--r--nixos/tests/pleroma.nix1
-rw-r--r--nixos/tests/privacyidea.nix1
-rw-r--r--nixos/tests/prometheus-exporters.nix2
-rw-r--r--nixos/tests/prometheus.nix1
-rw-r--r--nixos/tests/rspamd.nix5
-rw-r--r--nixos/tests/seafile.nix2
-rw-r--r--nixos/tests/signal-desktop.nix1
-rw-r--r--nixos/tests/spark/default.nix1
-rw-r--r--nixos/tests/sway.nix1
-rw-r--r--nixos/tests/switch-test.nix386
-rw-r--r--nixos/tests/sympa.nix1
-rw-r--r--nixos/tests/systemd-boot.nix4
-rw-r--r--nixos/tests/systemd-cryptenroll.nix1
-rw-r--r--nixos/tests/systemd.nix1
-rw-r--r--nixos/tests/vault-postgresql.nix1
-rw-r--r--nixos/tests/vault.nix1
-rw-r--r--nixos/tests/vaultwarden.nix1
-rw-r--r--nixos/tests/xfce.nix1
68 files changed, 63 insertions, 471 deletions
diff --git a/nixos/tests/airsonic.nix b/nixos/tests/airsonic.nix
index 59bd84877c61..d8df092c2ecf 100644
--- a/nixos/tests/airsonic.nix
+++ b/nixos/tests/airsonic.nix
@@ -11,10 +11,6 @@ import ./make-test-python.nix ({ pkgs, ... }: {
         enable = true;
         maxMemory = 800;
       };
-
-      # Airsonic is a Java application, and unfortunately requires a significant
-      # amount of memory.
-      virtualisation.memorySize = 1024;
     };
 
   testScript = ''
diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix
index ab107dfdcff7..e2b9c868bc85 100644
--- a/nixos/tests/all-tests.nix
+++ b/nixos/tests/all-tests.nix
@@ -343,8 +343,9 @@ in
   osrm-backend = handleTest ./osrm-backend.nix {};
   overlayfs = handleTest ./overlayfs.nix {};
   packagekit = handleTest ./packagekit.nix {};
-  pam-oath-login = handleTest ./pam-oath-login.nix {};
-  pam-u2f = handleTest ./pam-u2f.nix {};
+  pam-file-contents = handleTest ./pam/pam-file-contents.nix {};
+  pam-oath-login = handleTest ./pam/pam-oath-login.nix {};
+  pam-u2f = handleTest ./pam/pam-u2f.nix {};
   pantalaimon = handleTest ./matrix/pantalaimon.nix {};
   pantheon = handleTest ./pantheon.nix {};
   paperless-ng = handleTest ./paperless-ng.nix {};
diff --git a/nixos/tests/cage.nix b/nixos/tests/cage.nix
index e6bef374d303..83bae3deeeab 100644
--- a/nixos/tests/cage.nix
+++ b/nixos/tests/cage.nix
@@ -17,7 +17,6 @@ import ./make-test-python.nix ({ pkgs, ...} :
       program = "${pkgs.xterm}/bin/xterm -cm -pc -fa Monospace -fs 24";
     };
 
-    virtualisation.memorySize = 1024;
     # Need to switch to a different GPU driver than the default one (-vga std) so that Cage can launch:
     virtualisation.qemu.options = [ "-vga none -device virtio-gpu-pci" ];
   };
diff --git a/nixos/tests/cagebreak.nix b/nixos/tests/cagebreak.nix
index 242e59f5d7ab..c6c2c632b61a 100644
--- a/nixos/tests/cagebreak.nix
+++ b/nixos/tests/cagebreak.nix
@@ -35,7 +35,6 @@ in
     programs.xwayland.enable = true;
     environment.systemPackages = [ pkgs.cagebreak pkgs.wayland-utils ];
 
-    virtualisation.memorySize = 1024;
     # Need to switch to a different GPU driver than the default one (-vga std) so that Cagebreak can launch:
     virtualisation.qemu.options = [ "-vga none -device virtio-gpu-pci" ];
   };
diff --git a/nixos/tests/cassandra.nix b/nixos/tests/cassandra.nix
index bef3105f0a9e..a19d525c3431 100644
--- a/nixos/tests/cassandra.nix
+++ b/nixos/tests/cassandra.nix
@@ -41,7 +41,6 @@ let
       ];
     };
     services.cassandra = cassandraCfg ipAddress // extra;
-    virtualisation.memorySize = 1024;
   };
 in
 {
diff --git a/nixos/tests/ceph-multi-node.nix b/nixos/tests/ceph-multi-node.nix
index 33736e27b984..29e7c279d69a 100644
--- a/nixos/tests/ceph-multi-node.nix
+++ b/nixos/tests/ceph-multi-node.nix
@@ -37,7 +37,6 @@ let
 
   generateHost = { pkgs, cephConfig, networkConfig, ... }: {
     virtualisation = {
-      memorySize = 1024;
       emptyDiskImages = [ 20480 ];
       vlans = [ 1 ];
     };
diff --git a/nixos/tests/ceph-single-node-bluestore.nix b/nixos/tests/ceph-single-node-bluestore.nix
index f706d4d56fcf..acaae4cf300e 100644
--- a/nixos/tests/ceph-single-node-bluestore.nix
+++ b/nixos/tests/ceph-single-node-bluestore.nix
@@ -34,7 +34,6 @@ let
 
   generateHost = { pkgs, cephConfig, networkConfig, ... }: {
     virtualisation = {
-      memorySize = 1024;
       emptyDiskImages = [ 20480 20480 20480 ];
       vlans = [ 1 ];
     };
diff --git a/nixos/tests/ceph-single-node.nix b/nixos/tests/ceph-single-node.nix
index d1d56ea6708c..4fe5dc59ff8f 100644
--- a/nixos/tests/ceph-single-node.nix
+++ b/nixos/tests/ceph-single-node.nix
@@ -34,7 +34,6 @@ let
 
   generateHost = { pkgs, cephConfig, networkConfig, ... }: {
     virtualisation = {
-      memorySize = 1024;
       emptyDiskImages = [ 20480 20480 20480 ];
       vlans = [ 1 ];
     };
diff --git a/nixos/tests/common/wayland-cage.nix b/nixos/tests/common/wayland-cage.nix
index 55aeb858d7a4..fd0700941392 100644
--- a/nixos/tests/common/wayland-cage.nix
+++ b/nixos/tests/common/wayland-cage.nix
@@ -8,7 +8,6 @@
   };
 
   virtualisation = {
-    memorySize = 1024;
     qemu.options = [ "-vga virtio" ];
   };
 }
diff --git a/nixos/tests/containers-bridge.nix b/nixos/tests/containers-bridge.nix
index a1b0c9469d83..b8661fd7997c 100644
--- a/nixos/tests/containers-bridge.nix
+++ b/nixos/tests/containers-bridge.nix
@@ -15,7 +15,6 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: {
     { pkgs, ... }:
     { imports = [ ../modules/installer/cd-dvd/channel.nix ];
       virtualisation.writableStore = true;
-      virtualisation.memorySize = 768;
 
       networking.bridges = {
         br0 = {
diff --git a/nixos/tests/containers-ephemeral.nix b/nixos/tests/containers-ephemeral.nix
index fabf0593f23a..db1631cf5b5d 100644
--- a/nixos/tests/containers-ephemeral.nix
+++ b/nixos/tests/containers-ephemeral.nix
@@ -5,7 +5,6 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: {
   };
 
   machine = { pkgs, ... }: {
-    virtualisation.memorySize = 768;
     virtualisation.writableStore = true;
 
     containers.webserver = {
diff --git a/nixos/tests/containers-extra_veth.nix b/nixos/tests/containers-extra_veth.nix
index 172409f56e89..b8f3d9844064 100644
--- a/nixos/tests/containers-extra_veth.nix
+++ b/nixos/tests/containers-extra_veth.nix
@@ -8,7 +8,6 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: {
     { pkgs, ... }:
     { imports = [ ../modules/installer/cd-dvd/channel.nix ];
       virtualisation.writableStore = true;
-      virtualisation.memorySize = 768;
       virtualisation.vlans = [];
 
       networking.useDHCP = false;
diff --git a/nixos/tests/containers-hosts.nix b/nixos/tests/containers-hosts.nix
index 1f24ed1f3c2c..3c6a15710027 100644
--- a/nixos/tests/containers-hosts.nix
+++ b/nixos/tests/containers-hosts.nix
@@ -7,7 +7,6 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: {
   machine =
     { lib, ... }:
     {
-      virtualisation.memorySize = 256;
       virtualisation.vlans = [];
 
       networking.bridges.br0.interfaces = [];
diff --git a/nixos/tests/containers-imperative.nix b/nixos/tests/containers-imperative.nix
index 34103ef7586b..a126a5480c03 100644
--- a/nixos/tests/containers-imperative.nix
+++ b/nixos/tests/containers-imperative.nix
@@ -14,7 +14,6 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: {
       nix.binaryCaches = []; # don't try to access cache.nixos.org
 
       virtualisation.writableStore = true;
-      virtualisation.memorySize = 1024;
       # Make sure we always have all the required dependencies for creating a
       # container available within the VM, because we don't have network access.
       virtualisation.additionalPaths = let
diff --git a/nixos/tests/containers-ip.nix b/nixos/tests/containers-ip.nix
index 8fc42dab6241..91fdda0392a9 100644
--- a/nixos/tests/containers-ip.nix
+++ b/nixos/tests/containers-ip.nix
@@ -22,7 +22,6 @@ in import ./make-test-python.nix ({ pkgs, lib, ... }: {
       imports = [ ../modules/installer/cd-dvd/channel.nix ];
       virtualisation = {
         writableStore = true;
-        memorySize = 768;
       };
 
       containers.webserver4 = webserverFor "10.231.136.1" "10.231.136.2";
diff --git a/nixos/tests/containers-macvlans.nix b/nixos/tests/containers-macvlans.nix
index d0f41be8c125..a0cea8db4a1a 100644
--- a/nixos/tests/containers-macvlans.nix
+++ b/nixos/tests/containers-macvlans.nix
@@ -15,7 +15,6 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: {
     machine1 =
       { lib, ... }:
       {
-        virtualisation.memorySize = 256;
         virtualisation.vlans = [ 1 ];
 
         # To be able to ping containers from the host, it is necessary
@@ -55,7 +54,6 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: {
     machine2 =
       { ... }:
       {
-        virtualisation.memorySize = 256;
         virtualisation.vlans = [ 1 ];
       };
 
diff --git a/nixos/tests/containers-physical_interfaces.nix b/nixos/tests/containers-physical_interfaces.nix
index 57bd0eedcc33..e203f88786a3 100644
--- a/nixos/tests/containers-physical_interfaces.nix
+++ b/nixos/tests/containers-physical_interfaces.nix
@@ -7,7 +7,6 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: {
   nodes = {
     server = { ... }:
       {
-        virtualisation.memorySize = 256;
         virtualisation.vlans = [ 1 ];
 
         containers.server = {
@@ -23,7 +22,6 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: {
         };
       };
     bridged = { ... }: {
-      virtualisation.memorySize = 128;
       virtualisation.vlans = [ 1 ];
 
       containers.bridged = {
@@ -41,7 +39,6 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: {
     };
 
     bonded = { ... }: {
-      virtualisation.memorySize = 128;
       virtualisation.vlans = [ 1 ];
 
       containers.bonded = {
@@ -62,7 +59,6 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: {
     };
 
     bridgedbond = { ... }: {
-      virtualisation.memorySize = 128;
       virtualisation.vlans = [ 1 ];
 
       containers.bridgedbond = {
diff --git a/nixos/tests/containers-portforward.nix b/nixos/tests/containers-portforward.nix
index e21f6cee76a9..6cecd72f1bda 100644
--- a/nixos/tests/containers-portforward.nix
+++ b/nixos/tests/containers-portforward.nix
@@ -15,7 +15,6 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: {
     { pkgs, ... }:
     { imports = [ ../modules/installer/cd-dvd/channel.nix ];
       virtualisation.writableStore = true;
-      virtualisation.memorySize = 768;
 
       containers.webserver =
         { privateNetwork = true;
diff --git a/nixos/tests/containers-tmpfs.nix b/nixos/tests/containers-tmpfs.nix
index 0185c2d91f23..d95178d1ff58 100644
--- a/nixos/tests/containers-tmpfs.nix
+++ b/nixos/tests/containers-tmpfs.nix
@@ -8,7 +8,6 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: {
     { pkgs, ... }:
     { imports = [ ../modules/installer/cd-dvd/channel.nix ];
       virtualisation.writableStore = true;
-      virtualisation.memorySize = 768;
 
       containers.tmpfs =
         {
diff --git a/nixos/tests/custom-ca.nix b/nixos/tests/custom-ca.nix
index 4480519c7edc..0ab49f3b3430 100644
--- a/nixos/tests/custom-ca.nix
+++ b/nixos/tests/custom-ca.nix
@@ -81,8 +81,6 @@ in
 
       # chromium-based browsers refuse to run as root
       test-support.displayManager.auto.user = "alice";
-      # browsers may hang with the default memory
-      virtualisation.memorySize = 500;
 
       networking.hosts."127.0.0.1" = [ "good.example.com" "bad.example.com" ];
       security.pki.certificateFiles = [ "${example-good-cert}/ca.crt" ];
diff --git a/nixos/tests/enlightenment.nix b/nixos/tests/enlightenment.nix
index c5f0e208906b..8506c348246d 100644
--- a/nixos/tests/enlightenment.nix
+++ b/nixos/tests/enlightenment.nix
@@ -19,7 +19,6 @@ import ./make-test-python.nix ({ pkgs, ...} :
       };
     };
     hardware.pulseaudio.enable = true; # needed for the factl test, /dev/snd/* exists without them but udev doesn't care then
-    virtualisation.memorySize = 1024;
     environment.systemPackages = [ pkgs.xdotool ];
     services.acpid.enable = true;
     services.connman.enable = true;
diff --git a/nixos/tests/fcitx/default.nix b/nixos/tests/fcitx/default.nix
index cbeb95d33b0c..a243be8dc19b 100644
--- a/nixos/tests/fcitx/default.nix
+++ b/nixos/tests/fcitx/default.nix
@@ -11,7 +11,6 @@ import ../make-test-python.nix (
           ...
         }:
           {
-            virtualisation.memorySize = 1024;
 
             imports = [
               ../common/user-account.nix
diff --git a/nixos/tests/fenics.nix b/nixos/tests/fenics.nix
index 56f09d6a27e4..f0a8c32c7cd8 100644
--- a/nixos/tests/fenics.nix
+++ b/nixos/tests/fenics.nix
@@ -38,7 +38,6 @@ in
         gcc
         (python3.withPackages (ps: with ps; [ fenics ]))
       ];
-      virtualisation.memorySize = 512;
     };
   };
   testScript =
diff --git a/nixos/tests/firefox.nix b/nixos/tests/firefox.nix
index 7216ad43b8e9..6101fc973564 100644
--- a/nixos/tests/firefox.nix
+++ b/nixos/tests/firefox.nix
@@ -13,9 +13,6 @@ import ./make-test-python.nix ({ pkgs, firefoxPackage, ... }: {
         pkgs.xdotool
       ];
 
-      # Need some more memory to record audio.
-      virtualisation.memorySize = 500;
-
       # Create a virtual sound device, with mixing
       # and all, for recording audio.
       boot.kernelModules = [ "snd-aloop" ];
diff --git a/nixos/tests/gerrit.nix b/nixos/tests/gerrit.nix
index b6b6486fae86..8ae9e89cf6b0 100644
--- a/nixos/tests/gerrit.nix
+++ b/nixos/tests/gerrit.nix
@@ -18,7 +18,6 @@ in {
       { config, pkgs, ... }: {
         networking.firewall.allowedTCPPorts = [ 80 2222 ];
 
-        virtualisation.memorySize = 1024;
 
         services.gerrit = {
           enable = true;
diff --git a/nixos/tests/gnome-xorg.nix b/nixos/tests/gnome-xorg.nix
index b9ff5e682875..6264b87af4ec 100644
--- a/nixos/tests/gnome-xorg.nix
+++ b/nixos/tests/gnome-xorg.nix
@@ -40,7 +40,6 @@ import ./make-test-python.nix ({ pkgs, lib, ...} : {
         };
       };
 
-      virtualisation.memorySize = 1024;
     };
 
   testScript = { nodes, ... }: let
diff --git a/nixos/tests/gnome.nix b/nixos/tests/gnome.nix
index 1da97f733cfd..06f387ecad67 100644
--- a/nixos/tests/gnome.nix
+++ b/nixos/tests/gnome.nix
@@ -45,7 +45,6 @@ import ./make-test-python.nix ({ pkgs, lib, ...} : {
         };
       };
 
-      virtualisation.memorySize = 1024;
     };
 
   testScript = { nodes, ... }: let
diff --git a/nixos/tests/graphite.nix b/nixos/tests/graphite.nix
index 137be2d89c8b..496f16846ea6 100644
--- a/nixos/tests/graphite.nix
+++ b/nixos/tests/graphite.nix
@@ -4,7 +4,6 @@ import ./make-test-python.nix ({ pkgs, ... } :
   nodes = {
     one =
       { ... }: {
-        virtualisation.memorySize = 1024;
         time.timeZone = "UTC";
         services.graphite = {
           web = {
diff --git a/nixos/tests/hadoop/hadoop.nix b/nixos/tests/hadoop/hadoop.nix
index b4ed0e17a852..48737debab54 100644
--- a/nixos/tests/hadoop/hadoop.nix
+++ b/nixos/tests/hadoop/hadoop.nix
@@ -95,7 +95,6 @@ import ../make-test-python.nix ({pkgs, ...}: {
 
     # YARN cluster
     rm1 = {pkgs, options, ...}: {
-      virtualisation.memorySize = 1024;
       services.hadoop = {
         inherit package coreSite hdfsSite;
         yarnSite = options.services.hadoop.yarnSite.default // yarnSiteHA;
@@ -103,7 +102,6 @@ import ../make-test-python.nix ({pkgs, ...}: {
       };
     };
     rm2 = {pkgs, options, ...}: {
-      virtualisation.memorySize = 1024;
       services.hadoop = {
         inherit package coreSite hdfsSite;
         yarnSite = options.services.hadoop.yarnSite.default // yarnSiteHA;
diff --git a/nixos/tests/hadoop/hdfs.nix b/nixos/tests/hadoop/hdfs.nix
index 360dbd60ed27..b63cbf480327 100644
--- a/nixos/tests/hadoop/hdfs.nix
+++ b/nixos/tests/hadoop/hdfs.nix
@@ -2,7 +2,6 @@
 import ../make-test-python.nix ({...}: {
   nodes = {
     namenode = {pkgs, ...}: {
-      virtualisation.memorySize = 1024;
       services.hadoop = {
         package = pkgs.hadoop;
         hdfs = {
diff --git a/nixos/tests/installed-tests/fwupd.nix b/nixos/tests/installed-tests/fwupd.nix
index a8a683a1af7b..65614e2689d8 100644
--- a/nixos/tests/installed-tests/fwupd.nix
+++ b/nixos/tests/installed-tests/fwupd.nix
@@ -7,6 +7,5 @@ makeInstalledTest {
     services.fwupd.enable = true;
     services.fwupd.disabledPlugins = lib.mkForce []; # don't disable test plugin
     services.fwupd.enableTestRemote = true;
-    virtualisation.memorySize = 768;
   };
 }
diff --git a/nixos/tests/installer.nix b/nixos/tests/installer.nix
index 73dc676ca32d..513d2506e941 100644
--- a/nixos/tests/installer.nix
+++ b/nixos/tests/installer.nix
@@ -70,7 +70,7 @@ let
     let iface = if grubVersion == 1 then "ide" else "virtio";
         isEfi = bootLoader == "systemd-boot" || (bootLoader == "grub" && grubUseEfi);
         bios  = if pkgs.stdenv.isAarch64 then "QEMU_EFI.fd" else "OVMF.fd";
-    in if !isEfi && !(pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64) then
+    in if !isEfi && !pkgs.stdenv.hostPlatform.isx86 then
       throw "Non-EFI boot methods are only supported on i686 / x86_64"
     else ''
       def assemble_qemu_flags():
diff --git a/nixos/tests/jitsi-meet.nix b/nixos/tests/jitsi-meet.nix
index f9a0b121a2bf..d95f7c2ea9ea 100644
--- a/nixos/tests/jitsi-meet.nix
+++ b/nixos/tests/jitsi-meet.nix
@@ -8,7 +8,6 @@ import ./make-test-python.nix ({ pkgs, ... }: {
     client = { nodes, pkgs, ... }: {
     };
     server = { config, pkgs, ... }: {
-      virtualisation.memorySize = 512;
       services.jitsi-meet = {
         enable = true;
         hostName = "server";
diff --git a/nixos/tests/kafka.nix b/nixos/tests/kafka.nix
index 95711808a2c3..5def759ca24d 100644
--- a/nixos/tests/kafka.nix
+++ b/nixos/tests/kafka.nix
@@ -19,7 +19,6 @@ let
         };
 
         networking.firewall.allowedTCPPorts = [ 2181 ];
-        virtualisation.memorySize = 1024;
       };
       kafka = { ... }: {
         services.apache-kafka = {
diff --git a/nixos/tests/keycloak.nix b/nixos/tests/keycloak.nix
index fc321b8902f1..1be3fed6acc9 100644
--- a/nixos/tests/keycloak.nix
+++ b/nixos/tests/keycloak.nix
@@ -17,7 +17,6 @@ let
 
       nodes = {
         keycloak = { ... }: {
-          virtualisation.memorySize = 1024;
 
           security.pki.certificateFiles = [
             certs.ca.cert
diff --git a/nixos/tests/lxd-image.nix b/nixos/tests/lxd-image.nix
index bc8274eebedd..096b9d9aba90 100644
--- a/nixos/tests/lxd-image.nix
+++ b/nixos/tests/lxd-image.nix
@@ -46,8 +46,6 @@ in {
 
   machine = { lib, ... }: {
     virtualisation = {
-      # OOMs otherwise
-      memorySize = 1024;
       # disk full otherwise
       diskSize = 2048;
 
diff --git a/nixos/tests/metabase.nix b/nixos/tests/metabase.nix
index 370114e92223..1b25071902e9 100644
--- a/nixos/tests/metabase.nix
+++ b/nixos/tests/metabase.nix
@@ -7,7 +7,6 @@ import ./make-test-python.nix ({ pkgs, ... }: {
   nodes = {
     machine = { ... }: {
       services.metabase.enable = true;
-      virtualisation.memorySize = 1024;
     };
   };
 
diff --git a/nixos/tests/mysql/mysql.nix b/nixos/tests/mysql/mysql.nix
index dce5fa26acf7..2ac2b34a18e2 100644
--- a/nixos/tests/mysql/mysql.nix
+++ b/nixos/tests/mysql/mysql.nix
@@ -64,10 +64,6 @@ in
       {
         imports = [ users ];
 
-        # prevent oom:
-        # Kernel panic - not syncing: Out of memory: compulsory panic_on_oom is enabled
-        virtualisation.memorySize = 1024;
-
         services.mysql.enable = true;
         services.mysql.initialDatabases = [
           { name = "testdb3"; schema = ./testdb.sql; }
diff --git a/nixos/tests/networking-proxy.nix b/nixos/tests/networking-proxy.nix
index 62b5e690f6d1..fcb2558cf3b0 100644
--- a/nixos/tests/networking-proxy.nix
+++ b/nixos/tests/networking-proxy.nix
@@ -8,7 +8,6 @@ let default-config = {
 
         services.xserver.enable = false;
 
-        virtualisation.memorySize = 128;
       };
 in import ./make-test-python.nix ({ pkgs, ...} : {
   name = "networking-proxy";
diff --git a/nixos/tests/nginx-etag.nix b/nixos/tests/nginx-etag.nix
index a7bfc0d26958..b69511d081d4 100644
--- a/nixos/tests/nginx-etag.nix
+++ b/nixos/tests/nginx-etag.nix
@@ -37,7 +37,6 @@ import ./make-test-python.nix {
     };
 
     client = { pkgs, lib, ... }: {
-      virtualisation.memorySize = 512;
       environment.systemPackages = let
         testRunner = pkgs.writers.writePython3Bin "test-runner" {
           libraries = [ pkgs.python3Packages.selenium ];
diff --git a/nixos/tests/nixops/default.nix b/nixos/tests/nixops/default.nix
index 3fb81906a522..ec3d028aabae 100644
--- a/nixos/tests/nixops/default.nix
+++ b/nixos/tests/nixops/default.nix
@@ -26,7 +26,6 @@ let
         nix.binaryCaches = lib.mkForce [ ];
         users.users.person.isNormalUser = true;
         virtualisation.writableStore = true;
-        virtualisation.memorySize = 1024 /*MiB*/;
         virtualisation.additionalPaths = [
           pkgs.hello
           pkgs.figlet
diff --git a/nixos/tests/opensmtpd-rspamd.nix b/nixos/tests/opensmtpd-rspamd.nix
index 9cb2624e6c4e..19969a7b47dd 100644
--- a/nixos/tests/opensmtpd-rspamd.nix
+++ b/nixos/tests/opensmtpd-rspamd.nix
@@ -39,7 +39,6 @@ import ./make-test-python.nix {
 
     smtp2 = { pkgs, ... }: {
       imports = [ common/user-account.nix ];
-      virtualisation.memorySize = 512;
       networking = {
         firewall.allowedTCPPorts = [ 25 143 ];
         useDHCP = false;
diff --git a/nixos/tests/pam/pam-file-contents.nix b/nixos/tests/pam/pam-file-contents.nix
new file mode 100644
index 000000000000..86c61003aeb6
--- /dev/null
+++ b/nixos/tests/pam/pam-file-contents.nix
@@ -0,0 +1,25 @@
+let
+  name = "pam";
+in
+import ../make-test-python.nix ({ pkgs, ... }: {
+
+  nodes.machine = { ... }: {
+    imports = [ ../../modules/profiles/minimal.nix ];
+
+    krb5.enable = true;
+
+    users = {
+      mutableUsers = false;
+      users = {
+        user = {
+          isNormalUser = true;
+        };
+      };
+    };
+  };
+
+  testScript = builtins.replaceStrings
+    [ "@@pam_ccreds@@" "@@pam_krb5@@" ]
+    [ pkgs.pam_ccreds.outPath pkgs.pam_krb5.outPath ]
+    (builtins.readFile ./test_chfn.py);
+})
diff --git a/nixos/tests/pam-oath-login.nix b/nixos/tests/pam/pam-oath-login.nix
index 6d48199eda97..597596b211b1 100644
--- a/nixos/tests/pam-oath-login.nix
+++ b/nixos/tests/pam/pam-oath-login.nix
@@ -1,4 +1,4 @@
-import ./make-test-python.nix ({ ... }:
+import ../make-test-python.nix ({ ... }:
 
 let
   oathSnakeoilSecret = "cdd4083ef8ff1fa9178c6d46bfb1a3";
diff --git a/nixos/tests/pam-u2f.nix b/nixos/tests/pam/pam-u2f.nix
index f492baa9e139..0ac6ac17be82 100644
--- a/nixos/tests/pam-u2f.nix
+++ b/nixos/tests/pam/pam-u2f.nix
@@ -1,4 +1,4 @@
-import ./make-test-python.nix ({ ... }:
+import ../make-test-python.nix ({ ... }:
 
 {
   name = "pam-u2f";
diff --git a/nixos/tests/pam/test_chfn.py b/nixos/tests/pam/test_chfn.py
new file mode 100644
index 000000000000..b108a9423caf
--- /dev/null
+++ b/nixos/tests/pam/test_chfn.py
@@ -0,0 +1,27 @@
+expected_lines = {
+    "account required pam_unix.so",
+    "account sufficient @@pam_krb5@@/lib/security/pam_krb5.so",
+    "auth [default=die success=done] @@pam_ccreds@@/lib/security/pam_ccreds.so action=validate use_first_pass",
+    "auth [default=ignore success=1 service_err=reset] @@pam_krb5@@/lib/security/pam_krb5.so use_first_pass",
+    "auth required pam_deny.so",
+    "auth sufficient @@pam_ccreds@@/lib/security/pam_ccreds.so action=store use_first_pass",
+    "auth sufficient pam_rootok.so",
+    "auth sufficient pam_unix.so   likeauth try_first_pass",
+    "password sufficient @@pam_krb5@@/lib/security/pam_krb5.so use_first_pass",
+    "password sufficient pam_unix.so nullok sha512",
+    "session optional @@pam_krb5@@/lib/security/pam_krb5.so",
+    "session required pam_env.so conffile=/etc/pam/environment readenv=0",
+    "session required pam_unix.so",
+}
+actual_lines = set(machine.succeed("cat /etc/pam.d/chfn").splitlines())
+
+missing_lines = expected_lines - actual_lines
+extra_lines = actual_lines - expected_lines
+non_functional_lines = set([line for line in extra_lines if (line == "" or line.startswith("#"))])
+unexpected_functional_lines = extra_lines - non_functional_lines
+
+with subtest("All expected lines are in the file"):
+    assert not missing_lines, f"Missing lines: {missing_lines}"
+
+with subtest("All remaining lines are empty or comments"):
+    assert not unexpected_functional_lines, f"Unexpected lines: {unexpected_functional_lines}"
diff --git a/nixos/tests/pantheon.nix b/nixos/tests/pantheon.nix
index aebf6b534476..989d29a966df 100644
--- a/nixos/tests/pantheon.nix
+++ b/nixos/tests/pantheon.nix
@@ -15,7 +15,6 @@ import ./make-test-python.nix ({ pkgs, lib, ...} :
     services.xserver.enable = true;
     services.xserver.desktopManager.pantheon.enable = true;
 
-    virtualisation.memorySize = 1024;
   };
 
   enableOCR = true;
diff --git a/nixos/tests/paperless-ng.nix b/nixos/tests/paperless-ng.nix
index a4b2f348ec32..618eeec6b125 100644
--- a/nixos/tests/paperless-ng.nix
+++ b/nixos/tests/paperless-ng.nix
@@ -8,7 +8,6 @@ import ./make-test-python.nix ({ lib, ... }: {
       enable = true;
       passwordFile = builtins.toFile "password" "admin";
     };
-    virtualisation.memorySize = 1024;
   };
 
   testScript = ''
diff --git a/nixos/tests/plasma5-systemd-start.nix b/nixos/tests/plasma5-systemd-start.nix
index ac6fad7da6c6..72de19af70ce 100644
--- a/nixos/tests/plasma5-systemd-start.nix
+++ b/nixos/tests/plasma5-systemd-start.nix
@@ -21,7 +21,6 @@ import ./make-test-python.nix ({ pkgs, ...} :
         user = "alice";
       };
     };
-    virtualisation.memorySize = 1024;
   };
 
   testScript = { nodes, ... }: let
diff --git a/nixos/tests/plasma5.nix b/nixos/tests/plasma5.nix
index 281c9843e901..5c7ea602f79e 100644
--- a/nixos/tests/plasma5.nix
+++ b/nixos/tests/plasma5.nix
@@ -19,7 +19,6 @@ import ./make-test-python.nix ({ pkgs, ...} :
       user = "alice";
     };
     hardware.pulseaudio.enable = true; # needed for the factl test, /dev/snd/* exists without them but udev doesn't care then
-    virtualisation.memorySize = 1024;
   };
 
   testScript = { nodes, ... }: let
diff --git a/nixos/tests/pleroma.nix b/nixos/tests/pleroma.nix
index d0ae1488d134..bf3623fce38b 100644
--- a/nixos/tests/pleroma.nix
+++ b/nixos/tests/pleroma.nix
@@ -202,7 +202,6 @@ import ./make-test-python.nix ({ pkgs, ... }:
       security.pki.certificateFiles = [ "${tls-cert}/cert.pem" ];
       networking.extraHosts = hosts nodes;
       networking.firewall.enable = false;
-      virtualisation.memorySize = 512;
       environment.systemPackages = with pkgs; [
         provision-db
         provision-secrets
diff --git a/nixos/tests/privacyidea.nix b/nixos/tests/privacyidea.nix
index 4a94f0727946..c1141465ec24 100644
--- a/nixos/tests/privacyidea.nix
+++ b/nixos/tests/privacyidea.nix
@@ -8,7 +8,6 @@ import ./make-test-python.nix ({ pkgs, ...} : rec {
 
   machine = { ... }: {
     virtualisation.cores = 2;
-    virtualisation.memorySize = 512;
 
     services.privacyidea = {
       enable = true;
diff --git a/nixos/tests/prometheus-exporters.nix b/nixos/tests/prometheus-exporters.nix
index 38b93c4087c0..d069854328a2 100644
--- a/nixos/tests/prometheus-exporters.nix
+++ b/nixos/tests/prometheus-exporters.nix
@@ -464,7 +464,6 @@ let
         extraFlags = [ "--lnd.network=regtest" ];
       };
       metricProvider = {
-        virtualisation.memorySize = 1024;
         systemd.services.prometheus-lnd-exporter.serviceConfig.RestartSec = 15;
         systemd.services.prometheus-lnd-exporter.after = [ "lnd.service" ];
         services.bitcoind.regtest = {
@@ -953,7 +952,6 @@ let
       };
       metricProvider = {
         services.rspamd.enable = true;
-        virtualisation.memorySize = 1024;
       };
       exporterTest = ''
         wait_for_unit("rspamd.service")
diff --git a/nixos/tests/prometheus.nix b/nixos/tests/prometheus.nix
index 20f8c4459e10..a075cfc1f1b7 100644
--- a/nixos/tests/prometheus.nix
+++ b/nixos/tests/prometheus.nix
@@ -188,7 +188,6 @@ in import ./make-test-python.nix {
       # Minio requires at least 1GiB of free disk space to run.
       virtualisation = {
         diskSize = 2 * 1024;
-        memorySize = 1024;
       };
       networking.firewall.allowedTCPPorts = [ minioPort ];
 
diff --git a/nixos/tests/rspamd.nix b/nixos/tests/rspamd.nix
index 3fd55444fd8a..f0ccfe7ea0e6 100644
--- a/nixos/tests/rspamd.nix
+++ b/nixos/tests/rspamd.nix
@@ -25,7 +25,6 @@ let
     machine = {
       services.rspamd.enable = true;
       networking.enableIPv6 = enableIPv6;
-      virtualisation.memorySize = 1024;
     };
     testScript = ''
       start_all()
@@ -69,7 +68,6 @@ in
           group = "rspamd";
         }];
       };
-      virtualisation.memorySize = 1024;
     };
 
     testScript = ''
@@ -118,7 +116,6 @@ in
           '';
         };
       };
-      virtualisation.memorySize = 1024;
     };
 
     testScript = ''
@@ -224,7 +221,6 @@ in
           rspamd_logger.infox(rspamd_config, 'Work dammit!!!')
         '';
       };
-      virtualisation.memorySize = 1024;
     };
     testScript = ''
       ${initMachine}
@@ -291,7 +287,6 @@ in
         postfix.enable = true;
         workers.rspamd_proxy.type = "rspamd_proxy";
       };
-      virtualisation.memorySize = 1024;
     };
     testScript = ''
       ${initMachine}
diff --git a/nixos/tests/seafile.nix b/nixos/tests/seafile.nix
index 70b9ba55457e..6eec8b1fbe55 100644
--- a/nixos/tests/seafile.nix
+++ b/nixos/tests/seafile.nix
@@ -1,7 +1,6 @@
 import ./make-test-python.nix ({ pkgs, ... }:
   let
     client = { config, pkgs, ... }: {
-      virtualisation.memorySize = 256;
       environment.systemPackages = [ pkgs.seafile-shared pkgs.curl ];
     };
   in {
@@ -12,7 +11,6 @@ import ./make-test-python.nix ({ pkgs, ... }:
 
     nodes = {
       server = { config, pkgs, ... }: {
-        virtualisation.memorySize = 512;
         services.seafile = {
           enable = true;
           ccnetSettings.General.SERVICE_URL = "http://server";
diff --git a/nixos/tests/signal-desktop.nix b/nixos/tests/signal-desktop.nix
index 7bc7cfe18cf8..8c7230629923 100644
--- a/nixos/tests/signal-desktop.nix
+++ b/nixos/tests/signal-desktop.nix
@@ -29,7 +29,6 @@ in {
     environment.systemPackages = with pkgs; [
       signal-desktop file sqlite sqlcipher-signal
     ];
-    virtualisation.memorySize = 1024;
   };
 
   enableOCR = true;
diff --git a/nixos/tests/spark/default.nix b/nixos/tests/spark/default.nix
index 254cdec6e6b0..025c5a5222e7 100644
--- a/nixos/tests/spark/default.nix
+++ b/nixos/tests/spark/default.nix
@@ -3,7 +3,6 @@ import ../make-test-python.nix ({...}: {
 
   nodes = {
     worker = { nodes, pkgs, ... }: {
-      virtualisation.memorySize = 1024;
       services.spark.worker = {
         enable = true;
         master = "master:7077";
diff --git a/nixos/tests/sway.nix b/nixos/tests/sway.nix
index 01240ef572a6..3476ebab3e26 100644
--- a/nixos/tests/sway.nix
+++ b/nixos/tests/sway.nix
@@ -44,7 +44,6 @@ import ./make-test-python.nix ({ pkgs, lib, ...} :
     # To test pinentry via gpg-agent:
     programs.gnupg.agent.enable = true;
 
-    virtualisation.memorySize = 1024;
     # Need to switch to a different GPU driver than the default one (-vga std) so that Sway can launch:
     virtualisation.qemu.options = [ "-vga none -device virtio-gpu-pci" ];
   };
diff --git a/nixos/tests/switch-test.nix b/nixos/tests/switch-test.nix
index 7ea07a390b80..78adf7ffa7da 100644
--- a/nixos/tests/switch-test.nix
+++ b/nixos/tests/switch-test.nix
@@ -7,224 +7,15 @@ import ./make-test-python.nix ({ pkgs, ...} : {
   };
 
   nodes = {
-    machine = { config, pkgs, lib, ... }: {
-      environment.systemPackages = [ pkgs.socat ]; # for the socket activation stuff
+    machine = { ... }: {
       users.mutableUsers = false;
-
-      specialisation = {
-        # A system with a simple socket-activated unit
-        simple-socket.configuration = {
-          systemd.services.socket-activated.serviceConfig = {
-            ExecStart = pkgs.writeScript "socket-test.py" /* python */ ''
-              #!${pkgs.python3}/bin/python3
-
-              from socketserver import TCPServer, StreamRequestHandler
-              import socket
-
-              class Handler(StreamRequestHandler):
-                  def handle(self):
-                      self.wfile.write("hello".encode("utf-8"))
-
-              class Server(TCPServer):
-                  def __init__(self, server_address, handler_cls):
-                      # Invoke base but omit bind/listen steps (performed by systemd activation!)
-                      TCPServer.__init__(
-                          self, server_address, handler_cls, bind_and_activate=False)
-                      # Override socket
-                      self.socket = socket.fromfd(3, self.address_family, self.socket_type)
-
-              if __name__ == "__main__":
-                  server = Server(("localhost", 1234), Handler)
-                  server.serve_forever()
-            '';
-          };
-          systemd.sockets.socket-activated = {
-            wantedBy = [ "sockets.target" ];
-            listenStreams = [ "/run/test.sock" ];
-            socketConfig.SocketMode = lib.mkDefault "0777";
-          };
-        };
-
-        # The same system but the socket is modified
-        modified-socket.configuration = {
-          imports = [ config.specialisation.simple-socket.configuration ];
-          systemd.sockets.socket-activated.socketConfig.SocketMode = "0666";
-        };
-
-        # The same system but the service is modified
-        modified-service.configuration = {
-          imports = [ config.specialisation.simple-socket.configuration ];
-          systemd.services.socket-activated.serviceConfig.X-Test = "test";
-        };
-
-        # The same system but both service and socket are modified
-        modified-service-and-socket.configuration = {
-          imports = [ config.specialisation.simple-socket.configuration ];
-          systemd.services.socket-activated.serviceConfig.X-Test = "some_value";
-          systemd.sockets.socket-activated.socketConfig.SocketMode = "0444";
-        };
-
-        # A system with a socket-activated service and some simple services
-        service-and-socket.configuration = {
-          imports = [ config.specialisation.simple-socket.configuration ];
-          systemd.services.simple-service = {
-            wantedBy = [ "multi-user.target" ];
-            serviceConfig = {
-              Type = "oneshot";
-              RemainAfterExit = true;
-              ExecStart = "${pkgs.coreutils}/bin/true";
-            };
-          };
-
-          systemd.services.simple-restart-service = {
-            stopIfChanged = false;
-            wantedBy = [ "multi-user.target" ];
-            serviceConfig = {
-              Type = "oneshot";
-              RemainAfterExit = true;
-              ExecStart = "${pkgs.coreutils}/bin/true";
-            };
-          };
-
-          systemd.services.simple-reload-service = {
-            reloadIfChanged = true;
-            wantedBy = [ "multi-user.target" ];
-            serviceConfig = {
-              Type = "oneshot";
-              RemainAfterExit = true;
-              ExecStart = "${pkgs.coreutils}/bin/true";
-              ExecReload = "${pkgs.coreutils}/bin/true";
-            };
-          };
-
-          systemd.services.no-restart-service = {
-            restartIfChanged = false;
-            wantedBy = [ "multi-user.target" ];
-            serviceConfig = {
-              Type = "oneshot";
-              RemainAfterExit = true;
-              ExecStart = "${pkgs.coreutils}/bin/true";
-            };
-          };
-        };
-
-        # The same system but with an activation script that restarts all services
-        restart-and-reload-by-activation-script.configuration = {
-          imports = [ config.specialisation.service-and-socket.configuration ];
-          system.activationScripts.restart-and-reload-test = {
-            supportsDryActivation = true;
-            deps = [];
-            text = ''
-              if [ "$NIXOS_ACTION" = dry-activate ]; then
-                f=/run/nixos/dry-activation-restart-list
-              else
-                f=/run/nixos/activation-restart-list
-              fi
-              cat <<EOF >> "$f"
-              simple-service.service
-              simple-restart-service.service
-              simple-reload-service.service
-              no-restart-service.service
-              socket-activated.service
-              EOF
-            '';
-          };
-        };
-
-        # A system with a timer
-        with-timer.configuration = {
-          systemd.timers.test-timer = {
-            wantedBy = [ "timers.target" ];
-            timerConfig.OnCalendar = "@1395716396"; # chosen by fair dice roll
-          };
-          systemd.services.test-timer = {
-            serviceConfig = {
-              Type = "oneshot";
-              ExecStart = "${pkgs.coreutils}/bin/true";
-            };
-          };
-        };
-
-        # The same system but with another time
-        with-timer-modified.configuration = {
-          imports = [ config.specialisation.with-timer.configuration ];
-          systemd.timers.test-timer.timerConfig.OnCalendar = lib.mkForce "Fri 2012-11-23 16:00:00";
-        };
-
-        # A system with a systemd mount
-        with-mount.configuration = {
-          systemd.mounts = [
-            {
-              description = "Testmount";
-              what = "tmpfs";
-              type = "tmpfs";
-              where = "/testmount";
-              options = "size=1M";
-              wantedBy = [ "local-fs.target" ];
-            }
-          ];
-        };
-
-        # The same system but with another time
-        with-mount-modified.configuration = {
-          systemd.mounts = [
-            {
-              description = "Testmount";
-              what = "tmpfs";
-              type = "tmpfs";
-              where = "/testmount";
-              options = "size=10M";
-              wantedBy = [ "local-fs.target" ];
-            }
-          ];
-        };
-
-        # A system with a path unit
-        with-path.configuration = {
-          systemd.paths.test-watch = {
-            wantedBy = [ "paths.target" ];
-            pathConfig.PathExists = "/testpath";
-          };
-          systemd.services.test-watch = {
-            serviceConfig = {
-              Type = "oneshot";
-              ExecStart = "${pkgs.coreutils}/bin/touch /testpath-modified";
-            };
-          };
-        };
-
-        # The same system but watching another file
-        with-path-modified.configuration = {
-          imports = [ config.specialisation.with-path.configuration ];
-          systemd.paths.test-watch.pathConfig.PathExists = lib.mkForce "/testpath2";
-        };
-
-        # A system with a slice
-        with-slice.configuration = {
-          systemd.slices.testslice.sliceConfig.MemoryMax = "1"; # don't allow memory allocation
-          systemd.services.testservice = {
-            serviceConfig = {
-              Type = "oneshot";
-              RemainAfterExit = true;
-              ExecStart = "${pkgs.coreutils}/bin/true";
-              Slice = "testslice.slice";
-            };
-          };
-        };
-
-        # The same system but the slice allows to allocate memory
-        with-slice-non-crashing.configuration = {
-          imports = [ config.specialisation.with-slice.configuration ];
-          systemd.slices.testslice.sliceConfig.MemoryMax = lib.mkForce null;
-        };
-      };
     };
     other = { ... }: {
       users.mutableUsers = true;
     };
   };
 
-  testScript = { nodes, ... }: let
+  testScript = {nodes, ...}: let
     originalSystem = nodes.machine.config.system.build.toplevel;
     otherSystem = nodes.other.config.system.build.toplevel;
 
@@ -236,183 +27,12 @@ import ./make-test-python.nix ({ pkgs, ...} : {
       set -o pipefail
       exec env -i "$@" | tee /dev/stderr
     '';
-  in /* python */ ''
-    def switch_to_specialisation(name, action="test"):
-        out = machine.succeed(f"${originalSystem}/specialisation/{name}/bin/switch-to-configuration {action} 2>&1")
-        assert_lacks(out, "switch-to-configuration line")  # Perl warnings
-        return out
-
-    def assert_contains(haystack, needle):
-        if needle not in haystack:
-            print("The haystack that will cause the following exception is:")
-            print("---")
-            print(haystack)
-            print("---")
-            raise Exception(f"Expected string '{needle}' was not found")
-
-    def assert_lacks(haystack, needle):
-        if needle in haystack:
-            print("The haystack that will cause the following exception is:")
-            print("---")
-            print(haystack, end="")
-            print("---")
-            raise Exception(f"Unexpected string '{needle}' was found")
-
-
+  in ''
     machine.succeed(
         "${stderrRunner} ${originalSystem}/bin/switch-to-configuration test"
     )
     machine.succeed(
         "${stderrRunner} ${otherSystem}/bin/switch-to-configuration test"
     )
-
-    with subtest("systemd sockets"):
-        machine.succeed("${originalSystem}/bin/switch-to-configuration test")
-
-        # Simple socket is created
-        out = switch_to_specialisation("simple-socket")
-        assert_lacks(out, "stopping the following units:")
-        # not checking for reload because dbus gets reloaded
-        assert_lacks(out, "restarting the following units:")
-        assert_lacks(out, "\nstarting the following units:")
-        assert_contains(out, "the following new units were started: socket-activated.socket\n")
-        assert_lacks(out, "as well:")
-        machine.succeed("[ $(stat -c%a /run/test.sock) = 777 ]")
-
-        # Changing the socket restarts it
-        out = switch_to_specialisation("modified-socket")
-        assert_lacks(out, "stopping the following units:")
-        #assert_lacks(out, "reloading the following units:")
-        assert_contains(out, "restarting the following units: socket-activated.socket\n")
-        assert_lacks(out, "\nstarting the following units:")
-        assert_lacks(out, "the following new units were started:")
-        assert_lacks(out, "as well:")
-        machine.succeed("[ $(stat -c%a /run/test.sock) = 666 ]")  # change was applied
-
-        # The unit is properly activated when the socket is accessed
-        if machine.succeed("socat - UNIX-CONNECT:/run/test.sock") != "hello":
-            raise Exception("Socket was not properly activated")
-
-        # Changing the socket restarts it and ignores the active service
-        out = switch_to_specialisation("simple-socket")
-        assert_contains(out, "stopping the following units: socket-activated.service\n")
-        assert_lacks(out, "reloading the following units:")
-        assert_contains(out, "restarting the following units: socket-activated.socket\n")
-        assert_lacks(out, "\nstarting the following units:")
-        assert_lacks(out, "the following new units were started:")
-        assert_lacks(out, "as well:")
-        machine.succeed("[ $(stat -c%a /run/test.sock) = 777 ]")  # change was applied
-
-        # Changing the service does nothing when the service is not active
-        out = switch_to_specialisation("modified-service")
-        assert_lacks(out, "stopping the following units:")
-        assert_lacks(out, "reloading the following units:")
-        assert_lacks(out, "restarting the following units:")
-        assert_lacks(out, "\nstarting the following units:")
-        assert_lacks(out, "the following new units were started:")
-        assert_lacks(out, "as well:")
-
-        # Activating the service and modifying it stops it but leaves the socket untouched
-        machine.succeed("socat - UNIX-CONNECT:/run/test.sock")
-        out = switch_to_specialisation("simple-socket")
-        assert_contains(out, "stopping the following units: socket-activated.service\n")
-        assert_lacks(out, "reloading the following units:")
-        assert_lacks(out, "restarting the following units:")
-        assert_lacks(out, "\nstarting the following units:")
-        assert_lacks(out, "the following new units were started:")
-        assert_lacks(out, "as well:")
-
-        # Activating the service and both the service and the socket stops the service and restarts the socket
-        machine.succeed("socat - UNIX-CONNECT:/run/test.sock")
-        out = switch_to_specialisation("modified-service-and-socket")
-        assert_contains(out, "stopping the following units: socket-activated.service\n")
-        assert_lacks(out, "reloading the following units:")
-        assert_contains(out, "restarting the following units: socket-activated.socket\n")
-        assert_lacks(out, "\nstarting the following units:")
-        assert_lacks(out, "the following new units were started:")
-        assert_lacks(out, "as well:")
-
-    with subtest("restart and reload by activation file"):
-        out = switch_to_specialisation("service-and-socket")
-        # Switch to a system where the example services get restarted
-        # by the activation script
-        out = switch_to_specialisation("restart-and-reload-by-activation-script")
-        assert_lacks(out, "stopping the following units:")
-        assert_contains(out, "stopping the following units as well: simple-service.service, socket-activated.service\n")
-        assert_contains(out, "reloading the following units: simple-reload-service.service\n")
-        assert_contains(out, "restarting the following units: simple-restart-service.service\n")
-        assert_contains(out, "\nstarting the following units: simple-service.service")
-
-        # The same, but in dry mode
-        switch_to_specialisation("service-and-socket")
-        out = switch_to_specialisation("restart-and-reload-by-activation-script", action="dry-activate")
-        assert_lacks(out, "would stop the following units:")
-        assert_contains(out, "would stop the following units as well: simple-service.service, socket-activated.service\n")
-        assert_contains(out, "would reload the following units: simple-reload-service.service\n")
-        assert_contains(out, "would restart the following units: simple-restart-service.service\n")
-        assert_contains(out, "\nwould start the following units: simple-service.service")
-
-    with subtest("mounts"):
-        switch_to_specialisation("with-mount")
-        out = machine.succeed("mount | grep 'on /testmount'")
-        assert_contains(out, "size=1024k")
-
-        out = switch_to_specialisation("with-mount-modified")
-        assert_lacks(out, "stopping the following units:")
-        assert_contains(out, "reloading the following units: testmount.mount\n")
-        assert_lacks(out, "restarting the following units:")
-        assert_lacks(out, "\nstarting the following units:")
-        assert_lacks(out, "the following new units were started:")
-        assert_lacks(out, "as well:")
-        # It changed
-        out = machine.succeed("mount | grep 'on /testmount'")
-        assert_contains(out, "size=10240k")
-
-    with subtest("timers"):
-        switch_to_specialisation("with-timer")
-        out = machine.succeed("systemctl show test-timer.timer")
-        assert_contains(out, "OnCalendar=2014-03-25 02:59:56 UTC")
-
-        out = switch_to_specialisation("with-timer-modified")
-        assert_lacks(out, "stopping the following units:")
-        assert_lacks(out, "reloading the following units:")
-        assert_contains(out, "restarting the following units: test-timer.timer\n")
-        assert_lacks(out, "\nstarting the following units:")
-        assert_lacks(out, "the following new units were started:")
-        assert_lacks(out, "as well:")
-        # It changed
-        out = machine.succeed("systemctl show test-timer.timer")
-        assert_contains(out, "OnCalendar=Fri 2012-11-23 16:00:00")
-
-    with subtest("paths"):
-        switch_to_specialisation("with-path")
-        machine.fail("test -f /testpath-modified")
-
-        # touch the file, unit should be triggered
-        machine.succeed("touch /testpath")
-        machine.wait_until_succeeds("test -f /testpath-modified")
-
-        machine.succeed("rm /testpath")
-        machine.succeed("rm /testpath-modified")
-        switch_to_specialisation("with-path-modified")
-
-        machine.succeed("touch /testpath")
-        machine.fail("test -f /testpath-modified")
-        machine.succeed("touch /testpath2")
-        machine.wait_until_succeeds("test -f /testpath-modified")
-
-    # This test ensures that changes to slice configuration get applied.
-    # We test this by having a slice that allows no memory allocation at
-    # all and starting a service within it. If the service crashes, the slice
-    # is applied and if we modify the slice to allow memory allocation, the
-    # service should successfully start.
-    with subtest("slices"):
-        machine.succeed("echo 0 > /proc/sys/vm/panic_on_oom")  # allow OOMing
-        out = switch_to_specialisation("with-slice")
-        machine.fail("systemctl start testservice.service")
-        out = switch_to_specialisation("with-slice-non-crashing")
-        machine.succeed("systemctl start testservice.service")
-        machine.succeed("echo 1 > /proc/sys/vm/panic_on_oom")  # disallow OOMing
-
   '';
 })
diff --git a/nixos/tests/sympa.nix b/nixos/tests/sympa.nix
index eb38df180a78..aad7c95b6c99 100644
--- a/nixos/tests/sympa.nix
+++ b/nixos/tests/sympa.nix
@@ -5,7 +5,6 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: {
   machine =
     { ... }:
     {
-      virtualisation.memorySize = 1024;
 
       services.sympa = {
         enable = true;
diff --git a/nixos/tests/systemd-boot.nix b/nixos/tests/systemd-boot.nix
index a6742606dbef..c3899b58d6b3 100644
--- a/nixos/tests/systemd-boot.nix
+++ b/nixos/tests/systemd-boot.nix
@@ -102,12 +102,12 @@ in
       machine.succeed(
           """
         find /boot -iname '*.efi' -print0 | \
-        xargs -0 -I '{}' sed -i 's/#### LoaderInfo: systemd-boot .* ####/#### LoaderInfo: systemd-boot 001 ####/' '{}'
+        xargs -0 -I '{}' sed -i 's/#### LoaderInfo: systemd-boot .* ####/#### LoaderInfo: systemd-boot 000.0-1-notnixos ####/' '{}'
       """
       )
 
       output = machine.succeed("/run/current-system/bin/switch-to-configuration boot")
-      assert "updating systemd-boot from 001 to " in output
+      assert "updating systemd-boot from (000.0-1-notnixos) to " in output
     '';
   };
 }
diff --git a/nixos/tests/systemd-cryptenroll.nix b/nixos/tests/systemd-cryptenroll.nix
index 2c436f2de890..49634ef65672 100644
--- a/nixos/tests/systemd-cryptenroll.nix
+++ b/nixos/tests/systemd-cryptenroll.nix
@@ -8,7 +8,6 @@ import ./make-test-python.nix ({ pkgs, ... }: {
     environment.systemPackages = [ pkgs.cryptsetup ];
     virtualisation = {
       emptyDiskImages = [ 512 ];
-      memorySize = 1024;
       qemu.options = [
         "-chardev socket,id=chrtpm,path=/tmp/swtpm-sock"
         "-tpmdev emulator,id=tpm0,chardev=chrtpm"
diff --git a/nixos/tests/systemd.nix b/nixos/tests/systemd.nix
index e0685f53a945..6561f7efe1a5 100644
--- a/nixos/tests/systemd.nix
+++ b/nixos/tests/systemd.nix
@@ -5,7 +5,6 @@ import ./make-test-python.nix ({ pkgs, ... }: {
     imports = [ common/user-account.nix common/x11.nix ];
 
     virtualisation.emptyDiskImages = [ 512 512 ];
-    virtualisation.memorySize = 1024;
 
     environment.systemPackages = [ pkgs.cryptsetup ];
 
diff --git a/nixos/tests/vault-postgresql.nix b/nixos/tests/vault-postgresql.nix
index a563aead22a3..071cfd106ffb 100644
--- a/nixos/tests/vault-postgresql.nix
+++ b/nixos/tests/vault-postgresql.nix
@@ -12,7 +12,6 @@ import ./make-test-python.nix ({ pkgs, ... }:
     maintainers = [ lnl7 roberth ];
   };
   machine = { lib, pkgs, ... }: {
-    virtualisation.memorySize = 512;
     environment.systemPackages = [ pkgs.vault ];
     environment.variables.VAULT_ADDR = "http://127.0.0.1:8200";
     services.vault.enable = true;
diff --git a/nixos/tests/vault.nix b/nixos/tests/vault.nix
index c3b28b62695a..e86acd5b593f 100644
--- a/nixos/tests/vault.nix
+++ b/nixos/tests/vault.nix
@@ -8,7 +8,6 @@ import ./make-test-python.nix ({ pkgs, ... }:
     environment.systemPackages = [ pkgs.vault ];
     environment.variables.VAULT_ADDR = "http://127.0.0.1:8200";
     services.vault.enable = true;
-    virtualisation.memorySize = 512;
   };
 
   testScript =
diff --git a/nixos/tests/vaultwarden.nix b/nixos/tests/vaultwarden.nix
index b5343f5cad2d..56f1d245d505 100644
--- a/nixos/tests/vaultwarden.nix
+++ b/nixos/tests/vaultwarden.nix
@@ -140,7 +140,6 @@ let
               in
               [ pkgs.firefox-unwrapped pkgs.geckodriver testRunner ];
 
-            virtualisation.memorySize = 768;
           }
         ];
 
diff --git a/nixos/tests/xfce.nix b/nixos/tests/xfce.nix
index 148eccdbe308..9051deebae76 100644
--- a/nixos/tests/xfce.nix
+++ b/nixos/tests/xfce.nix
@@ -23,7 +23,6 @@ import ./make-test-python.nix ({ pkgs, ...} : {
 
       hardware.pulseaudio.enable = true; # needed for the factl test, /dev/snd/* exists without them but udev doesn't care then
 
-      virtualisation.memorySize = 1024;
     };
 
   testScript = { nodes, ... }: let