From a6fc12709dbc4cfd7a03eb7192aefa7ab91e58bc Mon Sep 17 00:00:00 2001 From: Kiara Grouwstra Date: Sat, 19 Jul 2025 18:43:28 +0200 Subject: [PATCH] resolve rebase --- default.nix | 3 +-- deployment/data-model-test.nix | 18 +++++++++--------- deployment/data-model.nix | 21 +-------------------- 3 files changed, 11 insertions(+), 31 deletions(-) diff --git a/default.nix b/default.nix index a4cea1a3..27b868b9 100644 --- a/default.nix +++ b/default.nix @@ -9,10 +9,9 @@ let git-hooks gitignore ; - inherit (import sources.flake-inputs) import-flake; - inputs = (import-flake { src = ./.; }).inputs; inherit (pkgs) lib; inherit (import sources.flake-inputs) import-flake; + inputs = (import-flake { src = ./.; }).inputs; inherit ((import-flake { src = ./.; }).inputs) nixops4; panel = import ./panel { inherit sources system; }; pre-commit-check = diff --git a/deployment/data-model-test.nix b/deployment/data-model-test.nix index 7b64d6fb..8897a406 100644 --- a/deployment/data-model-test.nix +++ b/deployment/data-model-test.nix @@ -1,7 +1,7 @@ let inherit (import ../default.nix { }) pkgs inputs; inherit (pkgs) lib; - inherit (lib) mkOption; + inherit (lib) mkOption types; eval = module: (lib.evalModules { @@ -165,14 +165,14 @@ in applications.hello.enable = true; }; }; - }; - environments.single-nixos-vm = { - - }; - configurations.example = { - enable = true; - applications.hello.enable = true; - # default = config.environments.single-nixos-vm.deployment config.example-configuration; + example-deployment = mkOption { + type = types.submoduleWith { + class = "nixops4Deployment"; + modules = [ nixops4Deployment ]; + }; + readOnly = true; + default = config.environments.single-nixos-vm.deployment config.example-configuration; + }; }; } ); diff --git a/deployment/data-model.nix b/deployment/data-model.nix index fb2343f4..87dbe3db 100644 --- a/deployment/data-model.nix +++ b/deployment/data-model.nix @@ -25,6 +25,7 @@ let ); }; }; + nixops4Deployment = inputs.nixops4.modules.nixops4Deployment.default; in { _class = "fediversity-settings"; @@ -89,26 +90,6 @@ in ]; }); }; - configuration = mkOption { - description = "Configuration type declaring options to be set by operators"; - type = optionType; - readOnly = true; - default = submodule { - options = { - enable = lib.mkEnableOption { - description = "your Fediversity configuration"; - }; - applications = lib.mapAttrs ( - _name: application: - mkOption { - description = application.description; - type = submodule application.module; - default = { }; - } - ) config.applications; - }; - }; - }; environments = mkOption { description = "Run-time environments for Fediversity applications to be deployed to"; type = attrsOf (submoduleWith {