2024-10-20 17:36:53 -07:00
|
|
|
{
|
|
|
|
testers,
|
|
|
|
home-manager,
|
|
|
|
}:
|
2024-06-29 07:09:49 -07:00
|
|
|
testers.runNixOSTest {
|
|
|
|
name = "module-test";
|
|
|
|
|
2024-10-20 17:36:53 -07:00
|
|
|
nodes.machine = {
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}: {
|
|
|
|
imports = [
|
|
|
|
home-manager.nixosModules.default
|
|
|
|
../modules/nixos
|
|
|
|
./common.nix
|
|
|
|
];
|
|
|
|
|
|
|
|
boot = {
|
|
|
|
loader.grub.enable = true;
|
|
|
|
};
|
2024-06-29 07:09:49 -07:00
|
|
|
|
2024-10-20 17:36:53 -07:00
|
|
|
services = {
|
|
|
|
displayManager.sddm = {
|
|
|
|
enable = true;
|
2024-06-29 07:09:49 -07:00
|
|
|
};
|
2024-10-20 17:36:53 -07:00
|
|
|
xserver.enable = true; # required for sddm
|
|
|
|
};
|
2024-06-29 07:09:49 -07:00
|
|
|
|
2024-10-20 17:36:53 -07:00
|
|
|
console.enable = true;
|
2024-06-29 07:09:49 -07:00
|
|
|
|
2024-10-20 17:36:53 -07:00
|
|
|
users.users.test = {
|
|
|
|
isNormalUser = true;
|
|
|
|
home = "/home/test";
|
|
|
|
};
|
2024-06-29 07:09:49 -07:00
|
|
|
|
2024-10-20 17:36:53 -07:00
|
|
|
virtualisation = {
|
|
|
|
memorySize = 4096;
|
|
|
|
writableStore = true;
|
|
|
|
};
|
2024-06-29 07:09:49 -07:00
|
|
|
|
2024-10-20 17:36:53 -07:00
|
|
|
home-manager.users.test = {
|
|
|
|
imports = [./home.nix];
|
2024-06-29 07:09:49 -07:00
|
|
|
};
|
2024-10-20 17:36:53 -07:00
|
|
|
};
|
2024-06-29 07:09:49 -07:00
|
|
|
|
|
|
|
testScript = _: ''
|
|
|
|
machine.start()
|
|
|
|
machine.wait_for_unit("home-manager-test.service")
|
|
|
|
machine.wait_until_succeeds("systemctl status home-manager-test.service")
|
|
|
|
machine.succeed("echo \"system started!\"")
|
|
|
|
'';
|
|
|
|
}
|