You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A number of NixOS options allow a user to specify a file instead of writing one as a nix expression for configuration, e.g. services.usbguard.ruleFile, security.pki.certificateFiles, etc. This can be useful if a user, for example already has a large number of pre-written configurations for whatever program they are using.
In my case, 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.
The text was updated successfully, but these errors were encountered:
Good proposal. I think this is useful and should not be hard to implement.
Currently, services.flatpak.overrides is just a Nix attrSet. I need to experiment a bit, but you should be able to split the configs across multiple files and assemble them at build time.
However, this doesn’t directly solve your problem. To load unmanaged (= not declared in nix-flatpak) overrides, you'll need to convert flatpak ini files to nix. There’s some ini-wrangling in #78 that might be useful for this feature.
Just to understand your use case better: how do you currently manage override files? Do you keep them version controlled outside of $XDG_DATA_HOME/flatpak/overrides?
As it currently stands I don't really manage override files. I mostly just set them and forget them, which I know, isn't particularly great, but I haven't really had the time to setup anything more sophisticated. I've considered using something like the nextcloud sync client to add them to each of my devices, but have to consider if any of the configuration would need to be changed on a by device basis.
What I would like to do, is put my premade overrides into a directory as part of my nix repo, and have them be auto deployed system wide or perhaps per user.
What I would like to do, is put my premade overrides into a directory as part of my nix repo, and have them be auto deployed system wide or perhaps per user.
The tricky part is managing attrset merges between configurations loaded from Flatpak ini files and those declared in nix. Under the hood, nix-flatpak uses jq to handle overrides state. I’m still undecided on whether to add additional logic to this process or refactor the overrides management directly within nix expressions instead of relying on jq. jq is great, but it makes things harder to test compared pure nix.
tl;dr: this issue is still in scope, but might require a bit more effort than initially estimated.
A number of NixOS options allow a user to specify a file instead of writing one as a nix expression for configuration, e.g.
services.usbguard.ruleFile
,security.pki.certificateFiles
, etc. This can be useful if a user, for example already has a large number of pre-written configurations for whatever program they are using.In my case, 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.The text was updated successfully, but these errors were encountered: