We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Currently object merging only takes the immediate children into account.
There may be utility in changing this, or adding additional syntax, to perform a 'deep merge', running the merge against every child object.
Issue originates from the below discussion, which compares the feature to Nix's 'attrset merge':
Originally posted by fbewivpjsbsby November 6, 2023
It is like nixos module, config will merge when you imports config, use // operators or use mkMerge. Corn is override attrsets now.
//
let { $preferences_user_enable = { Value = true Status = "user" } // telemetry $policies_disable_telemetry = { DisableTelemetry = true DisableFirefoxStudies = true } // #TODO 'raw data' need git version corn // theme $policies_theme = { Preferences = { 'toolkit.legacyUserProfileCustomizations.stylesheets' = $preferences_user_enable 'layout.css.backdrop-filter.enabled' = $preferences_user_enable 'widget.non-native-theme.use-theme-accent' = $preferences_user_enable } } $policies_ech = { // ech need enable DNS over HTTPS DNSOverHTTPS = { Enabled = true ProviderURL = "https://1.1.1.1/dns-query" Locked = false ExcludedDomains = [""] } Preferences = { 'network.dns.echconfig.enabled' = $preferences_user_enable 'network.dns.http3_echconfig.enabled' = $preferences_user_enable } } } in { policies = { // telemetry ..$policies_disable_telemetry // ech ..$policies_ech // theme ..$policies_theme } }
corn [your corn file name].corn -t json
{ "policies": { "DisableTelemetry": true, "DisableFirefoxStudies": true, "DNSOverHTTPS": { "Enabled": true, "ProviderURL": "https://1.1.1.1/dns-query", "Locked": false, "ExcludedDomains": [ "" ] }, "Preferences": { "toolkit.legacyUserProfileCustomizations.stylesheets": { "Value": true, "Status": "user" }, "layout.css.backdrop-filter.enabled": { "Value": true, "Status": "user" }, "widget.non-native-theme.use-theme-accent": { "Value": true, "Status": "user" } } } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Currently object merging only takes the immediate children into account.
There may be utility in changing this, or adding additional syntax, to perform a 'deep merge', running the merge against every child object.
Issue originates from the below discussion, which compares the feature to Nix's 'attrset merge':
Discussed in https://github.com/orgs/corn-config/discussions/29
Originally posted by fbewivpjsbsby November 6, 2023
corn-cli 0.9.2
Windows 10
Description
It is like nixos module, config will merge when you imports config, use
//
operators or use mkMerge.Corn is override attrsets now.
Steps to reproduce
corn [your corn file name].corn -t json
It is override by $policies_theme:The text was updated successfully, but these errors were encountered: