winget-cli icon indicating copy to clipboard operation
winget-cli copied to clipboard

Microsoft.Winget.DSC/ApplyConfiguration - Nested Configurations

Open Trenly opened this issue 2 years ago • 1 comments

Description of the new feature / enhancement

There are times where it would be nice to create a partial configuration file for a project. For example - I could have a configuration file that only manages the configuration of VSCode, a configuration file that manages Git, a configuration file that manages my WinGet settings, etc.

In order to apply all of these, I would have to call each one separately. It would be useful to be able to be able to write a DSC file that can apply other DSC files.

This would also allow DSC files with many many configuration steps to be broken down into logical parts and re-assembled with a top-level DSC file that applies each of the parts.

Proposed technical implementation details

As a user, I would like to be able to have a DSC file that can apply other DSC files.

There are items that would need to be considered -

  1. Preventing infinite loops (DSC files calling each other)
  2. Conflicting states between files

Trenly avatar Dec 08 '23 15:12 Trenly

Similar ask on the Dev Home repo https://github.com/microsoft/devhome/issues/3017

shakersMSFT avatar May 30 '24 17:05 shakersMSFT

being able to include configurations also would help with e.g CI vs regular dev scenarios and updates vs from-scratch setups. using parameters to enable/disable different parts of a configuration using parameters would be another way to avoid lots of duplication ( https://github.com/microsoft/winget-cli/issues/5049 )

cloph avatar Mar 12 '25 13:03 cloph