working on harmonia
This commit is contained in:
parent
1f466b63d3
commit
8dba8e7ce8
20 changed files with 556 additions and 90 deletions
|
|
@ -10,22 +10,40 @@
|
|||
runDynixTest = testModule: pkgs.testers.runNixOSTest {
|
||||
imports = [ testModule ];
|
||||
|
||||
# Note: these are arguments to the *test* modules.
|
||||
# Not the NixOS modules for the NixOS configuration the test is testing.
|
||||
# Wew.
|
||||
_module.args = { inherit dynix; };
|
||||
|
||||
# Why is this argument called "extraBaseModule**s**" but take a single module argument...
|
||||
extraBaseModules = { name, ... }: {
|
||||
#imports = [ dynixInjectionModule ];
|
||||
config.environment.systemPackages = [ dynix ];
|
||||
# Also note this is an extra base module for each node of the test,
|
||||
# not an extra test module.
|
||||
extraBaseModules = { name, config, options, modulesPath, ... }: {
|
||||
imports = (import "${modulesPath}/module-list.nix") ++ [
|
||||
./module-allow-rebuild-in-vm.nix
|
||||
"${modulesPath}/testing/test-instrumentation.nix"
|
||||
(toString dynix)
|
||||
];
|
||||
environment.systemPackages = [ dynix ];
|
||||
|
||||
systemd.services."install-dynix" = {
|
||||
enable = true;
|
||||
serviceConfig.Type = "oneshot";
|
||||
serviceConfig.RemainAfterExit = true;
|
||||
path = [ config.system.path ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "default.target" ];
|
||||
script = ''
|
||||
nix profile install -vv "$(realpath /run/current-system/sw/share/nixos/modules/dynix/)"
|
||||
'';
|
||||
};
|
||||
|
||||
passthru = { inherit options; };
|
||||
|
||||
# Just making something in this strict in `name`,
|
||||
# which is only present as an argument for nodes and I don't want to
|
||||
# confuse that with the test modules.
|
||||
config.warnings = builtins.seq name [ ];
|
||||
warnings = builtins.seq name [ ];
|
||||
};
|
||||
};
|
||||
|
||||
in lib.makeScope lib.callPackageWith (self: {
|
||||
gotosocial = runDynixTest ./gotosocial/test.nix;
|
||||
harmonia = runDynixTest ./harmonia/test.nix;
|
||||
#tzupdate = runDynixTest ./tzupdate/test.nix;
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue