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