feat: add support for homeConfigurations
All checks were successful
/ check (treefmt) (push) Successful in 3s
/ report-size (push) Successful in 2s
/ report-download-check (push) Successful in 1s

This enables support for `homeConfigurations` (the Home Manager
standalone configurations).
This commit is contained in:
Jalil David Salamé Messina 2025-06-02 18:30:23 +02:00
parent b7e76df813
commit 838f205020
Signed by: jalil
GPG key ID: F016B9E770737A0B
2 changed files with 51 additions and 8 deletions

View file

@ -64,7 +64,7 @@ markdown_from_report() {
<details><summary><b>Tips on reading this data</b></summary>
- For NixOS configurations you generally care only about the `Size` (closure size/size on disk).
- For NixOS/Home-Manager configurations you generally care only about the `Size` (closure size/size on disk).
- Reduce the `Size` by disabling unneeded services/default packages.
- For Packages you care about both the `Size` and the `NAR Size`.
- Reduce the `NAR Size` by reducing the size of the build outputs, e.g. don't copy unnecessary data to the $out dir, optimize binaries for size, etc.
@ -87,6 +87,16 @@ markdown_from_report() {
echo "$compare" | json_to_md_rows_and_change "nixosConfigurations"
echo
fi
if echo "$compare" | has_elements 'homeConfigurations'; then
cat <<-"EOF"
## Home Manager Configurations
| Name | Size | Size Change | NAR Size | NAR Size Change |
|------|-----:|------------:|---------:|----------------:|
EOF
echo "$compare" | json_to_md_rows_and_change "homeConfigurations"
echo
fi
if echo "$compare" | has_elements 'packages'; then
cat <<-"EOF"
## Packages
@ -108,6 +118,16 @@ markdown_from_report() {
json_to_md_rows "nixosConfigurations" "$1"
echo
fi
if has_elements 'homeConfigurations' "$1"; then
cat <<-"EOF"
## Home Manger Configurations
| Name | Size | NAR Size |
|------|-----:|---------:|
EOF
json_to_md_rows "homeConfigurations" "$1"
echo
fi
if has_elements 'packages' "$1"; then
cat <<-"EOF"
## Packages