Skip to content
Merged
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
14 changes: 14 additions & 0 deletions rust/agama-lib/share/examples/profile.jsonnet
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
// This is a Jsonnet file. Please, check https://jsonnet.org/ for more
// information about the language.
Comment thread
imobachgs marked this conversation as resolved.
// For the schema, see
// https://github.com/openSUSE/agama/blob/master/rust/agama-lib/share/profile.schema.json

// The "hw.libsonnet" file contains hardware information of the storage devices
// from the "lshw" tool. It is generated by running as root:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the most important information is that it is explicitly run by Agama itself, there is no magic for that.
https://github.com/openSUSE/agama/blob/b4bf25fdffd46735800a8396f1715fffe181e1db/rust/agama-lib/src/profile.rs#L128

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I merged too soon. I opened #655.

//
// lshw -json -class disk
//
// However, it is expected to change in the near future to include information
// from other subsystems (e.g., network).
local agama = import 'hw.libsonnet';

// Find the biggest disk which is suitable for installing the system.
local findBiggestDisk(disks) =
local sizedDisks = std.filter(function(d) std.objectHas(d, 'size'), disks);
local sorted = std.sort(sizedDisks, function(x) x.size);
Expand Down