Commit graph

12 commits

Author SHA1 Message Date
d066b1d55c
rename internal implementation to declare, mirroring apply 2025-08-18 10:24:09 +02:00
efbe7deddd
factor common logic back out
note that i worked around the question of how to delegate part of the
options to the consumer by creating aliases for different parts of the
function slot filling.
i've been pretty arbitrary about this so far tho, and mostly to preserve
existing interfaces, rather than out of conscious UX design per se.
so the interface can def change still, but at least the _user_'s side is
more DRY now!
2025-08-17 23:17:55 +02:00
fb004a4d4c
combine UX with parameter type-check - DRYing TODO 2025-08-17 17:24:43 +02:00
6fa9c40662
factor out function wrapper to module function
note that this does not yet contain the 'type check', as this does not
function yet.
this could be added in `data-model.nix` like:

```nix
function-type-check = mkOption {
  type = application.config.config-mapping.function-type;
  readOnly = true;
  default = input: {
    inherit input;
    output = application.config.config-mapping.implementation-type
input;
  };
};
```

... or even to `function.nix` itself, like:

```nix
function-type-check = mkOption {
  type = config.function-type;
  readOnly = true;
  default = input: {
    inherit input;
    output = config.implementation-type input;
  };
};
```
2025-08-01 17:56:35 +02:00
9c219341b1 Merge pull request 'move nixops4Deployment class' (#6) from kiara/Fediversity:data-model-fix-root-class into deployment-data-model-with-tests
Reviewed-on: #6
Reviewed-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2025-07-31 18:17:56 +02:00
8e8787d662
move nixops4Deployment class 2025-07-31 17:13:24 +02:00
68b834b6d7
fix linter gripes 2025-07-31 17:03:43 +02:00
35521fb40e implement and test data model for runtime environments 2025-07-29 17:07:33 +02:00
16d3c512e0 generalize function type 2025-07-29 17:06:32 +02:00
5345860006 data model: add run-time configuration (#437)
based on @fricklerhandwerk's work at https://git.fediversity.eu/fricklerhandwerk/Fediversity/compare/main...data-model-as-diagram part of #103.
supersedes #402.

on the application model, feedback on a [sample implementation](kiara/Fediversity#2) welcome as well.

Reviewed-on: Fediversity/Fediversity#437
Reviewed-by: Valentin Gagarin <valentin.gagarin@tweag.io>
Co-authored-by: Kiara Grouwstra <kiara@procolix.eu>
Co-committed-by: Kiara Grouwstra <kiara@procolix.eu>
2025-07-06 21:42:25 +02:00
9a25a04bfa specify _class module attributes to explicitly declare module types (#398)
closes #93.

note that this includes classes:

- `nixos`
- `nixosTest`
- `nixops4Resource`
- `nixops4Deployment`

.. and my (made-up, as per the [docs](https://ryantm.github.io/nixpkgs/module-system/module-system/#module-system-lib-evalModules-param-class)):

- `nix-unit`
- `package`

.. while i did not manage to cover:

- service tests, given `pkgs.nixosTest` seemed to not actually like `_class = "nixosTest"` (?!)

... nor #93's mentioned destructured arguments for that matter, as per Fediversity/Fediversity#93 (comment) - let me know if that is still desired as well.

Reviewed-on: Fediversity/Fediversity#398
Reviewed-by: Valentin Gagarin <valentin.gagarin@tweag.io>
Co-authored-by: Kiara Grouwstra <kiara@procolix.eu>
Co-committed-by: Kiara Grouwstra <kiara@procolix.eu>
2025-06-23 17:24:54 +02:00
939f9d961d add data model entity: application (#387)
part of #103.

Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
Reviewed-on: Fediversity/Fediversity#387
Co-authored-by: Kiara Grouwstra <kiara@procolix.eu>
Co-committed-by: Kiara Grouwstra <kiara@procolix.eu>
2025-06-17 17:11:52 +02:00