forked from Fediversity/Fediversity
model: [DUMMY] use mock deployment to temporarily simplify the problem
type policy.apply remove `apply`'s optionType, fixes duplicate definition error
This commit is contained in:
parent
9b5eb50fbc
commit
f7da88c919
3 changed files with 43 additions and 8 deletions
|
@ -15,7 +15,7 @@ let
|
||||||
./data-model.nix
|
./data-model.nix
|
||||||
];
|
];
|
||||||
}).config;
|
}).config;
|
||||||
nixops4Deployment = inputs.nixops4.modules.nixops4Deployment.default;
|
nixops4Deployment = import ./deployment.nix { inherit lib inputs; };
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
_class = "nix-unit";
|
_class = "nix-unit";
|
||||||
|
@ -133,15 +133,16 @@ in
|
||||||
resources.shell.login-shell.username = "operator";
|
resources.shell.login-shell.username = "operator";
|
||||||
implementation =
|
implementation =
|
||||||
requests:
|
requests:
|
||||||
{ providers, ... }:
|
{ ... }:
|
||||||
|
# { providers, ... }:
|
||||||
{
|
{
|
||||||
_class = "nixops4Deployment";
|
# _class = "nixops4Deployment";
|
||||||
providers = {
|
# providers = {
|
||||||
inherit (inputs.nixops4.modules.nixops4Provider) local;
|
# inherit (inputs.nixops4.modules.nixops4Provider) local;
|
||||||
};
|
# };
|
||||||
resources.the-machine = {
|
resources.the-machine = {
|
||||||
_class = "nixops4Resource";
|
_class = "nixops4Resource";
|
||||||
type = providers.local.exec;
|
# type = providers.local.exec;
|
||||||
imports = [
|
imports = [
|
||||||
inputs.nixops4-nixos.modules.nixops4Resource.nixos
|
inputs.nixops4-nixos.modules.nixops4Resource.nixos
|
||||||
];
|
];
|
||||||
|
|
|
@ -16,7 +16,7 @@ let
|
||||||
;
|
;
|
||||||
|
|
||||||
functionType = import ./function.nix;
|
functionType = import ./function.nix;
|
||||||
nixops4Deployment = inputs.nixops4.modules.nixops4Deployment.default;
|
nixops4Deployment = import ./deployment.nix { inherit lib 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";
|
||||||
|
|
34
deployment/deployment.nix
Normal file
34
deployment/deployment.nix
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
# inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
# let
|
||||||
|
# nixops4 = inputs.nixops4.outPath;
|
||||||
|
# in
|
||||||
|
|
||||||
|
# inputs.nixops4.modules.nixops4Deployment.default
|
||||||
|
|
||||||
|
# import inputs.nixops4.modules.nixops4Deployment.default
|
||||||
|
|
||||||
|
# resources: import inputs.nixops4.modules.nixops4Deployment.default {
|
||||||
|
# inherit lib config resources;
|
||||||
|
# # config = {
|
||||||
|
# # type providers provider inputs outputsSkeleton resourceType
|
||||||
|
# # };
|
||||||
|
# }
|
||||||
|
|
||||||
|
# {
|
||||||
|
# imports = [
|
||||||
|
# "${nixops4}/nix/deployment/providers.nix"
|
||||||
|
# "${nixops4}/nix/deployment/resources.nix"
|
||||||
|
# ];
|
||||||
|
# };
|
||||||
|
|
||||||
|
# "${nixops4}/nix/deployment/resources.nix"
|
||||||
|
|
||||||
|
{
|
||||||
|
options.resources = lib.mkOption {
|
||||||
|
type = lib.types.attrs;
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue