uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
94
nixos/modules/services/web-servers/nginx/gitweb.nix
Normal file
94
nixos/modules/services/web-servers/nginx/gitweb.nix
Normal file
|
|
@ -0,0 +1,94 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.services.nginx.gitweb;
|
||||
gitwebConfig = config.services.gitweb;
|
||||
package = pkgs.gitweb.override (optionalAttrs gitwebConfig.gitwebTheme {
|
||||
gitwebTheme = true;
|
||||
});
|
||||
|
||||
in
|
||||
{
|
||||
|
||||
options.services.nginx.gitweb = {
|
||||
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
description = ''
|
||||
If true, enable gitweb in nginx.
|
||||
'';
|
||||
};
|
||||
|
||||
location = mkOption {
|
||||
default = "/gitweb";
|
||||
type = types.str;
|
||||
description = ''
|
||||
Location to serve gitweb on.
|
||||
'';
|
||||
};
|
||||
|
||||
user = mkOption {
|
||||
default = "nginx";
|
||||
type = types.str;
|
||||
description = ''
|
||||
Existing user that the CGI process will belong to. (Default almost surely will do.)
|
||||
'';
|
||||
};
|
||||
|
||||
group = mkOption {
|
||||
default = "nginx";
|
||||
type = types.str;
|
||||
description = ''
|
||||
Group that the CGI process will belong to. (Set to <literal>config.services.gitolite.group</literal> if you are using gitolite.)
|
||||
'';
|
||||
};
|
||||
|
||||
virtualHost = mkOption {
|
||||
default = "_";
|
||||
type = types.str;
|
||||
description = ''
|
||||
VirtualHost to serve gitweb on. Default is catch-all.
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
systemd.services.gitweb = {
|
||||
description = "GitWeb service";
|
||||
script = "${package}/gitweb.cgi --fastcgi --nproc=1";
|
||||
environment = {
|
||||
FCGI_SOCKET_PATH = "/run/gitweb/gitweb.sock";
|
||||
};
|
||||
serviceConfig = {
|
||||
User = cfg.user;
|
||||
Group = cfg.group;
|
||||
RuntimeDirectory = [ "gitweb" ];
|
||||
};
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
};
|
||||
|
||||
services.nginx = {
|
||||
virtualHosts.${cfg.virtualHost} = {
|
||||
locations."${cfg.location}/static/" = {
|
||||
alias = "${package}/static/";
|
||||
};
|
||||
locations."${cfg.location}/" = {
|
||||
extraConfig = ''
|
||||
include ${config.services.nginx.package}/conf/fastcgi_params;
|
||||
fastcgi_param GITWEB_CONFIG ${gitwebConfig.gitwebConfigFile};
|
||||
fastcgi_pass unix:/run/gitweb/gitweb.sock;
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
meta.maintainers = with maintainers; [ ];
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue