-
-
Notifications
You must be signed in to change notification settings - Fork 13.9k
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/cgit: init #167319
nixos/cgit: init #167319
Conversation
How is this different from #110270 ? |
Also, what's wrong with |
I put it at |
OTOH we have a lot of other services that are not part of |
I added support for a location prefix. This should now be a -- I think -- cleaner version of #110270, with the order of options in the configuration file, fastcgiParams, and git clone support. I moved the options to |
I'd like to repeat that it's IMO a bad idea to put options for a service under the nginx namespace. |
I understand, but if multiple parallel instances of cgit are desired, I think, it's the best place to enable them. |
why is it necessary to (ab)use the nginx namespace for that purpose though? this can also be implemented under e.g. the namespace services.cgit. |
I moved it all to |
{ | ||
options = { | ||
services.cgit = mkOption { | ||
type = types.listOf (types.submodule ({ config, ... }: { |
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.
why not use types.attrsOf? with they key being the default value for nginx.virtualHost?
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.
This way currently gives the ability to run multiple cgit instances on the same vhost.
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.
you could do the same with attrsOf.
services.cgit."git.example.com" = { ... };
services.cgit."git.example.com2" = { nginx.virtualHost = "git.example.com"; nginx.location = "/git"; }
also I'm not sure if having multiple cgits on one instance is a common usecase.
attrs are generally preferred because they can be referenced again at some other point or can be overridden which is not possible with lists
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.
Alright, guess I'm happy with it, do you want to squash the changes? or should I do it when merging?
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.
@schnusch Thank 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.
Please rebase that we in the end only have the init commit left or should we squash merge?
As this is approved, any chance it can be merged? Thank you! |
Description of changes
Add cgit behind nginx using fcgiwrap.
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)nixos/doc/manual/md-to-db.sh
to update generated release notes