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/gitweb: add gitwebTheme option #38918
Conversation
I think this option should be added to the package first (it alters the package after all), so that we can do
|
@dotlambda Done, thanks! |
config = mkIf cfg.gitwebTheme { | ||
services.gitweb.package = pkgs.gitweb.override { | ||
gitwebTheme = true; | ||
}; |
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 will not allow you to override the package if you're using gitWebTheme
. Please just override cfg.package
in the implementation., e.g. let package = cfg.package.override { ... };
"/gitweb/static/" => "${pkgs.git}/share/gitweb/static/", | ||
"/gitweb/" => "${pkgs.git}/share/gitweb/gitweb.cgi" | ||
"/gitweb/static/" => "${cfg.package}/static/", | ||
"/gitweb/" => "${cfg.package}/gitweb.cgi" |
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.
Here you would use package
instead of cfg.package
.
config = mkIf cfg.gitwebTheme { | ||
services.gitweb.package = pkgs.gitweb.override { | ||
gitwebTheme = true; | ||
}; |
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 would not allow overriding the package if using gitwebTheme
. Please do e.g. let package = cfg.package.override { ... };
"/gitweb/static/" => "${pkgs.git}/share/gitweb/static/", | ||
"/gitweb/" => "${pkgs.git}/share/gitweb/gitweb.cgi" | ||
"/gitweb/static/" => "${cfg.package}/static/", | ||
"/gitweb/" => "${cfg.package}/gitweb.cgi" |
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.
Here you would use package
instead of cfg.package
.
@dotlambda Done, thanks! Though I've dropped package option as there is currently no use for it. It may apper in future if there will be need for it. |
@wmertens What do you think? Thanks |
I see 3 different things in this pr: remove some Perl deps, make a skin optional, and then use it by default. I'm not sure what is due to what; if this other skin allows dropping Perl deps I'm all for making it the default, even in the gitweb package. |
@wmertens No, no, there is no perl dependencies removal, there is move of gitweb part of git into a separate package. This will allow to modify gitweb without touching git package every time, because otherwise it leads to mass rebuild. |
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.
Ah ok, I understand now, I was misreading it. Looks good!
@@ -38,11 +41,10 @@ in | |||
|
|||
services.nginx = { | |||
virtualHosts.default = { | |||
locations."/gitweb/" = { | |||
root = "${pkgs.git}/share"; | |||
tryFiles = "$uri @gitweb"; |
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.
Is this no longer needed?
@wmertens Thank you! |
Motivation for this change
Add an option to use http://kogakure.github.io/gitweb-theme/ theme for GitWeb
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)