Compare commits

...

2 commits

Author SHA1 Message Date
9ba5ddfeda
swap out nixops4 from implementation 2025-07-22 15:10:24 +02:00
46f1497531
test proper expectation 2025-07-22 14:58:24 +02:00

View file

@ -126,34 +126,11 @@ in
{ {
_class = "fediversity-environment"; _class = "fediversity-environment";
resources.shell.login-shell.username = "operator"; resources.shell.login-shell.username = "operator";
implementation = implementation = requests: {
_requests: _class = "nixos";
{ providers, ... }: users.users = config.resources.login-shell.policy.apply (
{ lib.filterAttrs (_name: value: value ? login-shell) requests
_class = "nixops4Deployment"; );
providers = {
inherit (inputs.nixops4.modules.nixops4Provider) local;
};
# this seems checked according to {providers,resources,resource}.nix,
# values will not eagerly get checked, matching `providers.nix`'s `lazyAttrsOf`,
# whereas allowed keys seem to match those defined in `resource.nix`.
# the content of `resources.the-machine` however, follows `nixops4-nixos`,
# which is not allowed through our `type` yet.
resources.the-machine = {
_class = "nixops4Resource";
type = providers.local.exec;
imports = [
inputs.nixops4-nixos.modules.nixops4Resource.nixos
];
# nixos.module =
# { ... }:
# {
# _class = "nixos";
# users.users = config.resources.shell.login-shell.apply (
# lib.filterAttrs (_name: value: value ? login-shell) requests
# );
# };
};
}; };
}; };
}; };
@ -179,15 +156,20 @@ in
{ {
inherit (fediversity) inherit (fediversity)
example-configuration example-configuration
example-deployment
; ;
has-deployment = lib.isAttrs fediversity.example-deployment.resources.the-machine;
}; };
expected = { expected = {
example-configuration = { example-configuration = {
enable = true; enable = true;
applications.hello.enable = true; applications.hello.enable = true;
}; };
has-deployment = true; example-deployment = {
_class = "nixos";
users.users.operator = {
isNormalUser = true;
};
};
}; };
}; };
} }