forked from Fediversity/Fediversity
65 lines
1.6 KiB
Nix
65 lines
1.6 KiB
Nix
let
|
|
inherit (import ../default.nix { }) pkgs inputs;
|
|
inherit (pkgs) lib;
|
|
inherit (lib) mkOption types;
|
|
eval =
|
|
module:
|
|
(lib.evalModules {
|
|
specialArgs = {
|
|
inherit inputs;
|
|
};
|
|
modules = [
|
|
module
|
|
./data-model.nix
|
|
];
|
|
}).config;
|
|
nixops4Deployment = inputs.nixops4.modules.nixops4Deployment.default;
|
|
in
|
|
{
|
|
test-eval = {
|
|
expr =
|
|
let
|
|
fediversity = eval (
|
|
{ config, ... }:
|
|
{
|
|
config = {
|
|
resources.nixos = {
|
|
# TODO: consumer = ?
|
|
# TODO: provider = ?
|
|
};
|
|
applications.hello = {
|
|
description = ''Command-line tool that will print "Hello, world!" on the terminal'';
|
|
# TODO: module = ?
|
|
# TODO: config=mapping = ?
|
|
};
|
|
environments.single-nixos-vm = {
|
|
# TODO: resources = ?
|
|
# TODO: resource-mapping = ?
|
|
};
|
|
};
|
|
options = {
|
|
example-configuration = mkOption {
|
|
type = config.configuration;
|
|
readOnly = true;
|
|
default = {
|
|
enable = true;
|
|
applications.hello.enable = true;
|
|
};
|
|
};
|
|
example-deployment = mkOption {
|
|
type = nixops4Deployment;
|
|
readOnly = true;
|
|
default = config.environments.single-nixos-vm.deployment config.example-configuration;
|
|
};
|
|
};
|
|
}
|
|
);
|
|
in
|
|
{
|
|
|
|
};
|
|
expected =
|
|
{
|
|
};
|
|
};
|
|
}
|