Skip to content

GitInput: Allow setting a umask#1220

Open
dasJ wants to merge 1 commit intoNixOS:masterfrom
helsinki-systems:feat/git-input-umask
Open

GitInput: Allow setting a umask#1220
dasJ wants to merge 1 commit intoNixOS:masterfrom
helsinki-systems:feat/git-input-umask

Conversation

@dasJ
Copy link
Member

@dasJ dasJ commented Jun 12, 2022

No description provided.

@edolstra
Copy link
Member

Hm, what's the use case for this?

@dasJ
Copy link
Member Author

dasJ commented Jun 17, 2022

@edolstra probably one of the weirdest use cases tbh.

First off, initNix() (from nix) sets a umask which is too restrictive for me, overriding the one that is set from the systemd unit.
I could store the umask before the call, and restore it afterwards but I was too afraid I could break something nix-internal (I really don't know enough about it).

I want a more open umask because I wrote a Hydra plugin that interacts with the git repos as well by fetching into them and creating them if necessary.
This plugin however runs in hydra-notify while the regular git fetcher runs in hydra-evaluator. For this to work properly, I need to have write permissions for hydra group.

There may be a more clever solution I haven't thought of yet, maybe restoring the umask as mentioned above but this is the best I could come up with.

@dasJ
Copy link
Member Author

dasJ commented Jun 17, 2022

Now that I come to think of it, maybe not as weird as I expected.
My plugin has a evalAdded hook that parses local lockfiles and generates git inputs so the SCM diff works.
May be worth supporting for future things like a flake lock extractor?

@dasJ dasJ added the evaluator hydra-evaluator component label Jan 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

evaluator hydra-evaluator component

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants