forked from fediversity/fediversity
Compare commits
2 commits
ed94d17d39
...
5104ac51c7
| Author | SHA1 | Date | |
|---|---|---|---|
| 5104ac51c7 | |||
| 725e034355 |
2 changed files with 5 additions and 19 deletions
|
|
@ -7,15 +7,12 @@ let
|
|||
(lib.evalModules {
|
||||
specialArgs = {
|
||||
inherit inputs;
|
||||
# to be passed to nixops4Deployment
|
||||
resourceProviderSystem = builtins.currentSystem;
|
||||
};
|
||||
modules = [
|
||||
module
|
||||
./data-model.nix
|
||||
];
|
||||
}).config;
|
||||
nixops4Deployment = import ./deployment.nix { inherit inputs; };
|
||||
in
|
||||
{
|
||||
test-eval = {
|
||||
|
|
@ -171,10 +168,7 @@ in
|
|||
};
|
||||
};
|
||||
example-deployment = mkOption {
|
||||
type = types.submoduleWith {
|
||||
class = "nixops4Deployment";
|
||||
modules = [ nixops4Deployment ];
|
||||
};
|
||||
type = types.raw;
|
||||
readOnly = true;
|
||||
default = config.environments.single-nixos-vm.deployment config.example-configuration;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
|
|
@ -13,11 +12,10 @@ let
|
|||
submoduleWith
|
||||
optionType
|
||||
functionTo
|
||||
raw
|
||||
;
|
||||
|
||||
functionType = import ./function.nix;
|
||||
nixops4Deployment = import ./deployment.nix { inherit inputs; };
|
||||
|
||||
configuration = mkOption {
|
||||
description = "Configuration type declaring options to be set by operators";
|
||||
type = optionType;
|
||||
|
|
@ -146,10 +144,7 @@ in
|
|||
};
|
||||
implementation = mkOption {
|
||||
description = "Mapping of resources required by applications to available resources; the result can be deployed";
|
||||
type = functionTo (submoduleWith {
|
||||
class = "nixops4Deployment";
|
||||
modules = [ environment.config.resource-mapping.output-type ];
|
||||
});
|
||||
type = functionTo raw;
|
||||
};
|
||||
resource-mapping = mkOption {
|
||||
description = "Function type for the mapping from resources to a (NixOps4) deployment";
|
||||
|
|
@ -160,15 +155,12 @@ in
|
|||
readOnly = true;
|
||||
default = {
|
||||
input-type = configuration;
|
||||
output-type = nixops4Deployment;
|
||||
output-type = raw;
|
||||
};
|
||||
};
|
||||
deployment = mkOption {
|
||||
description = "Generate a deployment from a configuration";
|
||||
type = functionTo (submoduleWith {
|
||||
class = "nixops4Deployment";
|
||||
modules = [ environment.config.resource-mapping.output-type ];
|
||||
});
|
||||
type = functionTo raw;
|
||||
readOnly = true;
|
||||
default =
|
||||
cfg:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue