rose-pine-nix/tests/nixos.nix

53 lines
934 B
Nix

{
testers,
home-manager,
}:
testers.runNixOSTest {
name = "module-test";
nodes.machine = {
lib,
pkgs,
...
}: {
imports = [
home-manager.nixosModules.default
../modules/nixos
./common.nix
];
boot = {
loader.grub.enable = true;
};
services = {
displayManager.sddm = {
enable = true;
};
xserver.enable = true; # required for sddm
};
console.enable = true;
users.users.test = {
isNormalUser = true;
home = "/home/test";
};
virtualisation = {
memorySize = 4096;
writableStore = true;
};
home-manager.users.test = {
imports = [./home.nix];
};
};
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!\"")
'';
}