nix flake update as non-trusted user emits warnings about tarball-ttl #680

Closed
opened 2025-02-17 07:36:27 +00:00 by cobaltcause · 4 comments
Member

The first two lines printed after starting nix flake update are:

warning: Ignoring the client-specified setting 'tarball-ttl', because it is a restricted setting and you are not a trusted user
warning: Ignoring the client-specified setting 'tarball-ttl', because it is a restricted setting and you are not a trusted user

This confused me because I'm not setting that anywhere. Seems to me like Lix might be doing this internally somewhere. Maybe it should not try to do that if the current user isn't trusted?

The first two lines printed after starting `nix flake update` are: ``` warning: Ignoring the client-specified setting 'tarball-ttl', because it is a restricted setting and you are not a trusted user warning: Ignoring the client-specified setting 'tarball-ttl', because it is a restricted setting and you are not a trusted user ``` This confused me because I'm not setting that anywhere. Seems to me like Lix might be doing this internally somewhere. Maybe it should not try to do that if the current user isn't trusted?

I would very naively assume that this is related to this line in CmdFlakeUpdate (there is a similar one in CmdFlakeLock):

settings.tarballTtl.override(0);

Nix's equivalent (https://github.com/NixOS/nix/blame/8384e41b7608b5ff50306d3dec6171483cf2d4cd/src/nix/flake.cc#L131) is:

        settings.tarballTtl = 0;

It was changed in 4dbbd721eb, which suggests that "Only overridden settings are sent to the daemon" – so perhaps this is a latent Nix bug, hidden by the setting being silently ignored?

I would very naively assume that this is related to this line in `CmdFlakeUpdate` (there is a similar one in `CmdFlakeLock`): https://git.lix.systems/lix-project/lix/src/commit/42a8fb96567ef4ffae9494056da0c8ca5a7634df/lix/nix/flake.cc#L121 Nix's equivalent (https://github.com/NixOS/nix/blame/8384e41b7608b5ff50306d3dec6171483cf2d4cd/src/nix/flake.cc#L131) is: ```cpp settings.tarballTtl = 0; ``` It was changed in 4dbbd721eb9db75d4968a624b8cb9e75e979a144, which suggests that "Only overridden settings are sent to the daemon" – so perhaps this is a latent Nix bug, hidden by the setting being silently ignored?
pennae added this to the 2.93 milestone 2025-04-24 21:36:01 +00:00
Owner

@alois31 was this intentional?

@alois31 was this intentional?
Member

Ugh, the error message was certainly not intentional fallout from that change. Really the ultimate goal was that settings like that should never be sent to the daemon, but that work has unfortunately stalled.

Ugh, the error message was certainly not intentional fallout from that change. Really the ultimate goal was that settings like that should *never* be sent to the daemon, but that work has unfortunately stalled.
Member

This issue was mentioned on Gerrit on the following CLs:

  • commit message in cl/3097 ("nix: don't send tarballTtl to the daemon")
  • commit message in cl/3117 ("nix: don't send tarballTtl to the daemon")
<!-- GERRIT_LINKBOT: {"cls": [{"backlink": "https://gerrit.lix.systems/c/lix/+/3097", "number": 3097, "kind": "commit message"}, {"backlink": "https://gerrit.lix.systems/c/lix/+/3117", "number": 3117, "kind": "commit message"}], "cl_meta": {"3097": {"change_title": "nix: don't send tarballTtl to the daemon"}, "3117": {"change_title": "nix: don't send tarballTtl to the daemon"}}} --> This issue was mentioned on Gerrit on the following CLs: * commit message in [cl/3097](https://gerrit.lix.systems/c/lix/+/3097) ("nix: don't send tarballTtl to the daemon") * commit message in [cl/3117](https://gerrit.lix.systems/c/lix/+/3117) ("nix: don't send tarballTtl to the daemon")
Sign in to join this conversation.
No milestone
No project
No assignees
5 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lix-project/lix#680
No description provided.