Merge remote-tracking branch 'tv/master'
This commit is contained in:
commit
cf87c49f2c
@ -186,6 +186,12 @@ let
|
|||||||
type = types.nullOr types.str;
|
type = types.nullOr types.str;
|
||||||
default = null;
|
default = null;
|
||||||
};
|
};
|
||||||
|
source-filter = mkOption {
|
||||||
|
type = types.nullOr types.absolute-pathname;
|
||||||
|
default = null;
|
||||||
|
example = literalExample
|
||||||
|
"\${pkgs.cgit}/lib/cgit/filters/syntax-highlighting.py";
|
||||||
|
};
|
||||||
virtual-root = mkOption {
|
virtual-root = mkOption {
|
||||||
type = types.nullOr types.absolute-pathname;
|
type = types.nullOr types.absolute-pathname;
|
||||||
default = "/";
|
default = "/";
|
||||||
@ -452,6 +458,16 @@ let
|
|||||||
fastcgi_param HTTP_HOST $server_name;
|
fastcgi_param HTTP_HOST $server_name;
|
||||||
fastcgi_pass unix:${config.services.fcgiwrap.socketAddress};
|
fastcgi_pass unix:${config.services.fcgiwrap.socketAddress};
|
||||||
'';
|
'';
|
||||||
|
# Smart HTTP transport. Regex based on.
|
||||||
|
# https://github.com/git/git/blob/v2.27.0/http-backend.c#L708-L721
|
||||||
|
locations."~ \"^/[0-9A-Za-z._-]+/(HEAD|info/refs|objects/info/(alternates|http-alternates|packs)|[0-9a-f]{2}/([0-9a-f]{38}|[0-9a-f]{62})|pack/pack-([0-9a-f]{40}|[0-9a-f]{64})\\.(pack|idx)|git-upload-pack|git-receive-pack)$\"".extraConfig = ''
|
||||||
|
include ${pkgs.nginx}/conf/fastcgi_params;
|
||||||
|
fastcgi_param GIT_HTTP_EXPORT_ALL "";
|
||||||
|
fastcgi_param GIT_PROJECT_ROOT ${cfg.dataDir};
|
||||||
|
fastcgi_param PATH_INFO $fastcgi_script_name;
|
||||||
|
fastcgi_param SCRIPT_FILENAME ${pkgs.git}/bin/git-http-backend;
|
||||||
|
fastcgi_pass unix:${config.services.fcgiwrap.socketAddress};
|
||||||
|
'';
|
||||||
locations."/static/".extraConfig = ''
|
locations."/static/".extraConfig = ''
|
||||||
root ${pkgs.cgit}/cgit;
|
root ${pkgs.cgit}/cgit;
|
||||||
rewrite ^/static(/.*)$ $1 break;
|
rewrite ^/static(/.*)$ $1 break;
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 3e731035ed44659624e6d00bbb35570f2b8811fd
|
Subproject commit 5ea125514e48c630120fbb6a44e9ae0c7932a123
|
@ -5,6 +5,29 @@ with import <stockholm/lib>;
|
|||||||
let {
|
let {
|
||||||
|
|
||||||
body = {
|
body = {
|
||||||
|
|
||||||
|
nixpkgs.config.packageOverrides = super: {
|
||||||
|
cgit = pkgs.symlinkJoin {
|
||||||
|
name = "${super.cgit.name}-tv";
|
||||||
|
paths = [
|
||||||
|
(pkgs.runCommand "${super.cgit.name}-tv-overrides" {
|
||||||
|
} /* sh */ ''
|
||||||
|
mkdir -p $out/lib/cgit/filters
|
||||||
|
cd $out/lib/cgit/filters
|
||||||
|
cp \
|
||||||
|
${super.cgit}/lib/cgit/filters/syntax-highlighting.py \
|
||||||
|
${super.cgit}/lib/cgit/filters/.syntax-highlighting.py-wrapped \
|
||||||
|
.
|
||||||
|
sed -i "s:${super.cgit}:$out:" syntax-highlighting.py
|
||||||
|
sed -i '
|
||||||
|
s:^\(formatter =\).*:\1 HtmlFormatter(style="algol_nu"):
|
||||||
|
' .syntax-highlighting.py-wrapped
|
||||||
|
'')
|
||||||
|
super.cgit
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
krebs.git = {
|
krebs.git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
cgit = {
|
cgit = {
|
||||||
@ -22,6 +45,7 @@ let {
|
|||||||
];
|
];
|
||||||
root-desc = "mostly krebs";
|
root-desc = "mostly krebs";
|
||||||
root-title = "repositories at ${config.krebs.build.host.name}";
|
root-title = "repositories at ${config.krebs.build.host.name}";
|
||||||
|
source-filter = "${pkgs.cgit}/lib/cgit/filters/syntax-highlighting.py";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
repos = repos;
|
repos = repos;
|
||||||
|
@ -15,6 +15,15 @@
|
|||||||
pkgs.tpacpi-bat
|
pkgs.tpacpi-bat
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# fix jumpy touchpad
|
||||||
|
# https://wiki.archlinux.org/index.php/Lenovo_ThinkPad_X220#X220_Touchpad_cursor_jump/imprecise
|
||||||
|
{
|
||||||
|
services.udev.extraHwdb = /* sh */ ''
|
||||||
|
touchpad:i8042:*
|
||||||
|
LIBINPUT_MODEL_LENOVO_X220_TOUCHPAD_FW81=1
|
||||||
|
'';
|
||||||
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.extraModulePackages = [
|
boot.extraModulePackages = [
|
||||||
|
Loading…
Reference in New Issue
Block a user