-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removes basic check packages in favor of proper VM testing infrastructure.
- Loading branch information
Showing
4 changed files
with
67 additions
and
41 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
let | ||
userHome = "/home/alice"; | ||
in | ||
(import ./lib.nix) { | ||
name = "hjem-basic"; | ||
nodes = { | ||
machine = { | ||
self, | ||
pkgs, | ||
... | ||
}: { | ||
imports = [self.nixosModules.hjem]; | ||
|
||
users.groups.alice = {}; | ||
users.users.alice = { | ||
isNormalUser = true; | ||
home = userHome; | ||
}; | ||
|
||
homes = { | ||
alice = { | ||
directory = userHome; | ||
files.".config/foo".text = "Hello world!"; | ||
packages = [pkgs.hello]; | ||
}; | ||
}; | ||
}; | ||
}; | ||
|
||
testScript = '' | ||
# Start all machines | ||
start_all() | ||
# wait for our service to start | ||
machine.wait_for_unit("systemd-tmpfiles-setup.service") | ||
output = machine.succeed("ls ${userHome}/.config/foo") | ||
''; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# The first argument to this function is the test module itself | ||
test: { | ||
pkgs, | ||
self, | ||
}: let | ||
inherit (pkgs) lib; | ||
nixos-lib = import (pkgs.path + "/nixos/lib") {}; | ||
in | ||
(nixos-lib.runTest { | ||
hostPkgs = pkgs; | ||
defaults.documentation.enable = lib.mkDefault false; | ||
|
||
node.specialArgs = {inherit self;}; | ||
imports = [test]; | ||
}) | ||
.config | ||
.result |