-
-
Notifications
You must be signed in to change notification settings - Fork 15.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nixos/redmine: fix permissions & cleanup #56243
Conversation
@GrahamcOfBorg test redmine.redmine_3 redmine.redmine_4 |
@flokli feel like merging? On top of standard nixos tests I briefly ran this code in my organizations dev environment with no issues. |
ln -fs "${cfg.stateDir}/public/$i" /run/redmine/public/ | ||
done | ||
|
||
mkdir -m 0750 -p \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can't we create these directories through systemd.tmpfiles.rules
too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@flokli No need. The root has already been created with appropriate permission so the preStart script is free to operate here.
Do you have a style preference that says use tmpfiles.d over bash?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do prefer declaring expected directory structure in systemd notation instead of shell scripts setting it up (so [StateDirectory=, CacheDirectory=, LogsDirectory=, and ConfigurationDirectory=
over] tmpfiles.d
over bash)
- but that's more personal preference than general consensus.
Looking deeper into the setup script, do we really need to set all this up at each start, or can't we pre-build parts of the structure through nix?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@flokli That makes sense. I'll rework this to use tmpfiles.d and get back to you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@flokli I think this should be good enough. Look alright to you?
@GrahamcOfBorg test redmine.redmine_3 redmine.redmine_4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
Motivation for this change
#53852
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)