Skip to content

feat: systems and formats - #38

Draft
tupakkatapa wants to merge 9 commits into
mainfrom
feat/format
Draft

feat: systems and formats#38
tupakkatapa wants to merge 9 commits into
mainfrom
feat/format

Conversation

@tupakkatapa

@tupakkatapa tupakkatapa commented Sep 27, 2023

Copy link
Copy Markdown
Member

Added '--format' and '--system' flags to the buidl script.

This means that you can now build any combination of the supported formats and systems on command:

echo $json_data | nix run .#buidl -- -b homestakeros -n foobar -f isoImage -s aarch64-linux

This functionality works by generating nixosConfigurations attributes in the flake for every possible combination of these parameters for each configured host.

Attribute names are formatted as follows: 'name-system-format', for example:

[I] kari@torque ~/W/HomestakerOS (feat/format)> nix eval --json .#nixosConfigurations --apply builtins.attrNames --no-warn-dirty | jq -r '.[]'
foobar-aarch64-linux-isoImage
foobar-aarch64-linux-kexecTree
foobar-x86_64-linux-isoImage
foobar-x86_64-linux-kexecTree

Despite having multiple nixosConfigurations entries, the hosts will still only have one directory at webui/public/nixosConfigurations and nixosConfigurations.

@tupakkatapa

tupakkatapa commented Sep 27, 2023

Copy link
Copy Markdown
Member Author

This PR requires changes to the frontend, hence the draft.

EDIT: Here is some more information for the record. The frontend should include "rogue" options for the --format and --system parameters, as they are unrelated to the module options, aka the schema. Therefore, the logic for handling these options should be implemented entirely on the frontend side, which will then pass the appropriate flags to nix run .#buidl based on these options.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant