declarative-flatpak icon indicating copy to clipboard operation
declarative-flatpak copied to clipboard

Update tmpfiles.rules to tmpfiles.settings

Open dastarruer opened this issue 1 month ago • 10 comments

Fix issue where tmpfiles.rules threw an error when switching/rebuilding (because it was outdated) by instead using tmpfiles.settings.

Uses "what-do-i-name-this?" as a placeholder config name. This will get updated later.

dastarruer avatar Nov 03 '25 23:11 dastarruer

Is there a reason why you set user and group to -?

Also I think you can name the rule "flatpak-directory"

in-a-dil-emma avatar Nov 04 '25 10:11 in-a-dil-emma

There was no reason to set it to -, I just didn't see that those settings had default values.

I've just removed the placeholder name and those default values.

dastarruer avatar Nov 04 '25 15:11 dastarruer

I've just removed the placeholder name and those default values.

Except that the system service sets ownership to root and group to users.

I made it that way for security reasons.

So please change it back and I'll merge :)

in-a-dil-emma avatar Nov 05 '25 09:11 in-a-dil-emma

I see that someone already opened an issue on the home-manager repo.

https://github.com/nix-community/home-manager/issues/8125

I'd rather have that change reverted by the home-manager devs than to adapt to their change if it were me.

This is very disappointing, honestly.

in-a-dil-emma avatar Nov 05 '25 10:11 in-a-dil-emma

I've just removed the placeholder name and those default values.

Except that the system service sets ownership to root and group to users.

Sorry, I misunderstood what you said. I've just changed it back

I'd rather have that change reverted by the home-manager devs than to adapt to their change if it were me.

This is very disappointing, honestly.

Agreed, I had to dig through the source code to even figure out how to use tmpfiles.settings. There are no examples anywhere to go off of, and usually when this happens, it only throws a warning instead of refusing to rebuild.

dastarruer avatar Nov 05 '25 14:11 dastarruer

This can be closed, they reverted the change and will do everything the proper way now: https://github.com/nix-community/home-manager/pull/8136

ToasterUwU avatar Nov 05 '25 20:11 ToasterUwU

This can be closed, they reverted the change and will do everything the proper way now...

I'm not sure how home manager usually handles deprecation, but I think this should still get merged. In the future, the original tmpfiles.rules option might not exist, and we'll have this exact same problem again.

Even if the original does exist in the future, I don't see why removing a soon-to-be deprecated option could be a bad idea.

Given all that, should I still close this?

dastarruer avatar Nov 05 '25 23:11 dastarruer

The current blocker is the lack of documentation for the new option. So unless they get their stuff together and release the proper way, there isnt much that can be done yet. Since they reverted and said they will do it properly, its also not impossible that something changes.

You can either close this and then make a new PR when the feature got properly released, or make this a Draft until then and edit it.

But at least for now, there is no way forward for this, we need to wait for home manager to properly release everything and see what the implementation is and what the docs say how to use it.

ToasterUwU avatar Nov 05 '25 23:11 ToasterUwU

Just made this a draft, since this issue will probably come up again anyways.

As an aside, I am confused what you mean by no documentation. I just checked here: https://home-manager-options.extranix.com/?query=systemd.user.tmpfiles.settings&release=master and there is some documentation. It's not amazing, but it's definitely there.

dastarruer avatar Nov 05 '25 23:11 dastarruer

Misphrased a bit, i meant there is "no proper/decent" documentation.

ToasterUwU avatar Nov 06 '25 03:11 ToasterUwU