forked from fediversity/fediversity
Compare commits
2 commits
dd542cdfae
...
9ba5ddfeda
| Author | SHA1 | Date | |
|---|---|---|---|
| 9ba5ddfeda | |||
| 46f1497531 |
1 changed files with 13 additions and 31 deletions
|
|
@ -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;
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue