Introduce a framework for automated VM tests.

This commit is contained in:
r-vdp 2023-04-23 03:00:58 +02:00 committed by Ramses
parent 2f8a9ba967
commit 22684b6ed6
17 changed files with 2194 additions and 350 deletions

View file

@ -20,6 +20,7 @@
hostPlatform = lib.mkOption {
type = types.str;
example = "x86_64-linux";
default = throw "the option nixpkgs.hostPlatform needs to be set.";
};
};
@ -131,5 +132,19 @@
'';
};
};
# Can we make sure that this does not get relaunched when activating a new profile?
# Otherwise we get an infinite loop.
systemd.services.reactivate-system-manager = {
enable = false;
# TODO should we activate earlier?
wantedBy = [ "multi-user.target" ];
serviceConfig = {
Type = "oneshot";
};
script = ''
/nix/var/nix/profiles/system-manager-profiles/system-manager/bin/activate
'';
};
};
}

View file

@ -125,6 +125,10 @@ in
config = {
systemd = {
targets.system-manager = {
wantedBy = [ "default.target" ];
};
timers =
lib.mapAttrs
(name: service: