Draft
Conversation
Read overrides from user provided config files, and perform a three way merge with `config.flatpak.overrides` and active state config.
Refactor flatpak.overrides to include two attributes: - settings: an attribute set of override settings - files: a list of paths to ini Flatpak overrides files. The files will be merged with the settings attribute set.
Bump to reflect `overrides` changes.
c040480 to
8421a37
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WARNING: this PR contains experimental code. It overwrites system/user flatpak override files and could cause data loss.
Addresses #82 , #128.
What
This PR introduces the capability to read overrides from user provided config files, and perform a three way merge with
config.flatpak.overridesand the active state config.Why
From #82:
[...] I have a number of Flatpak override config files already present on my device. It would be very useful if I could simply drop them in a folder as part of my OS config. This would also allow users to use tools they are already familiar with, when configuring Flatpak overrides, e.g. flatseal, and the built in configuration tool present on KDE. [...]
How
The
overridesconfig has been refactored with two new options:settings: an attribute set of override settingsfiles: a list of paths to ini Flatpak overrides files. The files will be merged with the settings attribute set.At activation
nix-flatpakwill merge override configurations from multiple sources:base: base configuration from override files (config.flatpak.overrides.files).active: currently active overrides (existing state. e.g.$HOME/.local/share/flatpak/overrides).old_state: previous declarative state (e.g.$HOME/.local/state/home-manager/gcroots/flatpak-state.json).new_state: new declarative state (e.g.config.flatpak.overrides.settings).For each entry, the merge formula is:
Example
Known issues
nix-flatpakcontains an extra newline