API: machine config with packages #1614

Open
opened 2024-06-12 09:11:20 +00:00 by hsjobeki · 0 comments
Owner

As a user i want to configure my machine with the following:

Machine A

{
    {"packages": ["firefox"]}
}

The machine should have "firefox" installed.

Implementation:

This should be implemented with a clan module:

  • The module maps this list of string to a list of pkgs.
  • The module should implement the inventory interface.
    • There should be one file in the role directory (default.nix) this file will be included into every machine that uses the module through inventory)
    • The default.nix module must merge all package-sets configured via potentially different instances in the inventory.
      (Implementation note: lib.unique has O(n^2) which is potentially slow. Allowing duplicates might be okay. We can filter them in the frontend and nix wont add the package two times.

Question: How to handle problems such as [ "python3_10" "python3_12" ]

As a user i want to configure my machine with the following: Machine A ```json { {"packages": ["firefox"]} } ``` The machine should have "firefox" installed. Implementation: This should be implemented with a clan module: - The module maps this list of string to a list of pkgs. - The module should implement the inventory interface. - There should be one file in the role directory (default.nix) this file will be included into every machine that uses the module through inventory) - The default.nix module must merge all package-sets configured via potentially different instances in the inventory. (Implementation note: lib.unique has O(n^2) which is potentially slow. Allowing duplicates might be okay. We can filter them in the frontend and nix wont add the package two times. Question: How to handle problems such as [ "python3_10" "python3_12" ]
hsjobeki added this to the Clan_Kanban_Board project 2024-06-12 09:11:24 +00:00
hsjobeki changed title from API: machine config to API: machine config with packages 2024-06-12 09:21:49 +00:00
kenji was assigned by hsjobeki 2024-06-26 10:09:04 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: clan/clan-core#1614
No description provided.