Fediversity/deployment/check/data-model/deployment.nix

53 lines
1.1 KiB
Nix

{
inputs,
# sources,
lib,
config,
...
}:
let
# inherit (import ./constants.nix) targetMachines pathToRoot pathFromRoot;
eval =
module:
(lib.evalModules {
specialArgs = {
inherit inputs;
};
modules = [
module
../../data-model.nix
];
}).config;
fediversity = eval (
{ ... }:
{
config = {
environments.single-nixos-vm =
{ ... }:
{
implementation = requests: {
input = requests;
output.ssh-host = {
ssh = {
host = "localhost";
username = "root";
authentication.password = "password";
};
nixos-configuration =
{ ... }:
{
users.users = config.resources.shell.login-shell.apply (
lib.filterAttrs (_name: value: value ? login-shell) requests
);
};
};
};
};
};
}
);
in
fediversity.environments.single-nixos-vm.deployment {
enable = true;
}