Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions crates/omnix-cli/src/command/show.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,14 @@ impl ShowCommand {
self.flake_url
)),
);
print_flake_output_table(
"🔄 Process Compose",
&["allSystems", system.as_ref()],
Some(format!(
"nix run {}#<name>",
self.flake_url
)),
);
print_flake_output_table("🔧 NixOS Modules", &["nixosModules"], None);
print_flake_output_table(
"🐳 Docker Images",
Expand Down
18 changes: 17 additions & 1 deletion nix/flake-schemas/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 29 additions & 1 deletion nix/flake-schemas/flake.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
inputs = {
flake-schemas.url = "github:DeterminateSystems/flake-schemas";
systems.url = "github:nix-systems/default";
};
outputs = { flake-schemas, ... }:
outputs = inputs@{ flake-schemas, ... }:
let
appsSchema = {
version = 1;
Expand Down Expand Up @@ -79,6 +80,32 @@
})
output);
};
processComposeSchema = {
# Enabling flake-parts `debug` flag is required for this schema to work.
# https://flake.parts/options/flake-parts.html#opt-debug
# TODO: https://github.com/Platonic-Systems/process-compose-flake should provide schema for it self
# So that omnix at runtime can fetch and merge the schema from the flake
version = 1;
doc = ''
The `apps` output provides commands available via `nix run`.
'';
inventory = output:
flake-schemas.lib.mkChildren (builtins.listToAttrs (map
(system: {
name = system;
value = flake-schemas.lib.mkChildren (builtins.mapAttrs
(processes: definition:
{
evalChecks.isValidProcess =
definition ? settings;
what = "Process Compose";
evalOnAllSystems = true;
})
(output.${system}.process-compose or { }));
})
(import inputs.systems)));
};

in
{
schemas = flake-schemas.schemas // {
Expand All @@ -87,6 +114,7 @@
nixosConfigurations = nixosConfigurationsSchema;
homeConfigurations = homeConfigurationsSchema;
darwinConfigurations = darwinConfigurationsSchema;
allSystems = processComposeSchema;
};
};
}