From 9fec52cfb9a2fca2e6ad2aa505075de47e930165 Mon Sep 17 00:00:00 2001 From: Cullum Smith Date: Thu, 14 Nov 2024 20:40:35 -0500 Subject: more updates for git server --- files/usr/local/etc/icinga2/conf.d/services.conf.icinga_server | 9 ++++++--- files/usr/local/etc/nginx/vhosts.conf.git_server | 5 +++++ files/usr/local/etc/ssh/sshd_config.freebsd | 2 -- .../lib/cgit/filters/syntax-highlighting-custom.py.git_server | 2 +- scripts/hostclass/git_server | 2 +- site | 2 +- vars/hostclass/desktop | 1 + 7 files changed, 15 insertions(+), 8 deletions(-) diff --git a/files/usr/local/etc/icinga2/conf.d/services.conf.icinga_server b/files/usr/local/etc/icinga2/conf.d/services.conf.icinga_server index 116fe44..ce08657 100644 --- a/files/usr/local/etc/icinga2/conf.d/services.conf.icinga_server +++ b/files/usr/local/etc/icinga2/conf.d/services.conf.icinga_server @@ -263,7 +263,8 @@ apply Service "http" { || "xmpp-servers" in host.groups || "znc-servers" in host.groups || "icinga-servers" in host.groups - || "bitwarden-servers" in host.groups) + || "bitwarden-servers" in host.groups + || "git-servers" in host.groups) } // Expect HTTP 302 @@ -304,7 +305,8 @@ apply Service "https" { vars.http_critical_time = ${icinga_response_time_crit} assign where ("pkg-repositories" in host.groups || "znc-servers" in host.groups - || "bitwarden-servers" in host.groups) + || "bitwarden-servers" in host.groups + || "git-servers" in host.groups) } // Expect HTTPS 404 @@ -350,7 +352,8 @@ apply Service "https-cert" { || "smtp-servers" in host.groups || "icinga-servers" in host.groups || "web-servers" in host.groups - || "ttrss-servers" in host.groups) + || "ttrss-servers" in host.groups + || "git-servers" in host.groups) && !host.vars.https_vhosts) } diff --git a/files/usr/local/etc/nginx/vhosts.conf.git_server b/files/usr/local/etc/nginx/vhosts.conf.git_server index fdd5f53..0d24050 100644 --- a/files/usr/local/etc/nginx/vhosts.conf.git_server +++ b/files/usr/local/etc/nginx/vhosts.conf.git_server @@ -39,6 +39,11 @@ $(printf ' deny %s;\n' $kerberized_cidrs) fastcgi_pass unix:${gitolite_fcgiwrap_socket}; } + location /custom-style.css { + add_header Cache-Control "public"; + expires 1d; + } + location @cgit { include fastcgi_params; fastcgi_param SCRIPT_FILENAME ${cgit_webroot}/cgit.cgi; diff --git a/files/usr/local/etc/ssh/sshd_config.freebsd b/files/usr/local/etc/ssh/sshd_config.freebsd index 0e0d730..eca2276 100644 --- a/files/usr/local/etc/ssh/sshd_config.freebsd +++ b/files/usr/local/etc/ssh/sshd_config.freebsd @@ -13,6 +13,4 @@ GSSAPICleanupCredentials yes UsePAM yes UseDNS no -# TODO: require group to login? - Subsystem sftp /usr/local/libexec/sftp-server diff --git a/files/usr/local/lib/cgit/filters/syntax-highlighting-custom.py.git_server b/files/usr/local/lib/cgit/filters/syntax-highlighting-custom.py.git_server index 1d71275..6346ec4 100644 --- a/files/usr/local/lib/cgit/filters/syntax-highlighting-custom.py.git_server +++ b/files/usr/local/lib/cgit/filters/syntax-highlighting-custom.py.git_server @@ -13,7 +13,7 @@ sys.stdin = io.TextIOWrapper(sys.stdin.buffer, encoding='utf-8', errors='replace sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8', errors='replace') data = sys.stdin.read() filename = sys.argv[1] -formatter = HtmlFormatter(style='${cgit_pygments_style}', nobackground=True) +formatter = HtmlFormatter(style='${cgit_pygments_style}') try: lexer = guess_lexer_for_filename(filename, data) diff --git a/scripts/hostclass/git_server b/scripts/hostclass/git_server index c7ac63d..46db426 100644 --- a/scripts/hostclass/git_server +++ b/scripts/hostclass/git_server @@ -8,7 +8,7 @@ : ${cgit_clone_urls:="https://${fqdn} ssh://git@${fqdn}"} : ${cgit_root_title:="${site} Git Repo"} : ${cgit_root_desc:="Source code for various ${site} projects."} -: ${cgit_pygments_style:='xcode'} +: ${cgit_pygments_style:='default'} : ${cgit_cache_size:='16000'} gitolite_dn="uid=${gitolite_username},${robots_basedn}" diff --git a/site b/site index 5042102..fd6afaa 160000 --- a/site +++ b/site @@ -1 +1 @@ -Subproject commit 50421027aea1591245b42e5ceefb0b49da9da64e +Subproject commit fd6afaa219fed6717ca81071fd9a82db2f5f6396 diff --git a/vars/hostclass/desktop b/vars/hostclass/desktop index ba12df3..40a8919 100644 --- a/vars/hostclass/desktop +++ b/vars/hostclass/desktop @@ -47,6 +47,7 @@ git gnupg hs-pandoc inconsolata-ttf +jq krb5 libreoffice libva-utils -- cgit v1.2.3