diff options
| author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2026-07-30 14:05:39 +0200 |
|---|---|---|
| committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2026-07-30 14:05:39 +0200 |
| commit | c153a351659e4596acfc31f00bf594343cbfcd68 (patch) | |
| tree | a9ed83de07711d6424fbea09aad28891bae5bfe4 /modules/vhack/gi/git-server/css.nix | |
| parent | hosts/server3: Setup prometheus server in agent mode (diff) | |
| download | nixos-server-c153a351659e4596acfc31f00bf594343cbfcd68.zip | |
modules: Use namespaces
That might make it easier in the future to merge different server
configs together (and thusly facilitate code-reuse.).
Diffstat (limited to 'modules/vhack/gi/git-server/css.nix')
| -rw-r--r-- | modules/vhack/gi/git-server/css.nix | 119 |
1 files changed, 119 insertions, 0 deletions
diff --git a/modules/vhack/gi/git-server/css.nix b/modules/vhack/gi/git-server/css.nix new file mode 100644 index 0000000..7d0ad06 --- /dev/null +++ b/modules/vhack/gi/git-server/css.nix @@ -0,0 +1,119 @@ +{ + cgitPkg, + pkgs, +}: let + /* + Adapted from `https://git.qyliss.net/nixlib/sys/atuin.nix`, originally distributed under + the MIT license. + */ + cgitCss = + pkgs.runCommand "cgit-extra.css" { + licenseHeader = '' + /* + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License v2 as published + * by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * See <https://www.gnu.org/licenses/>. + */ + + ''; + + # Adapted from + # <https://git.causal.agency/src/plain/www/git.causal.agency/custom.css>, + # distributed as a Larger Work under a Secondary License, + # as permitted by the terms of the + # Mozilla Public License Version 2.0. + extraCss = '' + * { line-height: 1.25em; } + + article { + font-family: sans-serif; + max-width: 70ch; + margin-left: auto; + margin-right: auto; + } + + div#cgit { + margin: auto; + font-family: monospace; + -moz-tab-size: 4; + tab-size: 4; + display: table; + } + + div#cgit table#header { + margin-left: auto; + margin-right: auto; + } + div#cgit table#header td.logo { + display: none; + } + div#cgit table#header td.main { + font-size: 1em; + font-weight: bold; + } + div#cgit table#header td.sub { + border-top: none; + } + div#cgit table.tabs { + margin-left: auto; + margin-right: auto; + border-bottom: none; + } + div#cgit div.content { + border-bottom: none; + min-width: 108ch; + } + div#cgit div.content div#summary { + display: table; + margin-left: auto; + margin-right: auto; + } + div#cgit div.notes { + border: none; + background: transparent; + padding: 0; + } + div#cgit table.list { + margin-left: auto; + margin-right: auto; + } + div#cgit table.list th a { + color: inherit; + } + div#cgit table.list tr:nth-child(even) { + background: inherit; + } + div#cgit table.list tr:hover { + background: inherit; + } + div#cgit table.list tr.nohover-highlight:hover:nth-child(even) { + background: inherit; + } + div#cgit div.footer { + font-size: 1em; + margin-top: 0; + } + + div#cgit table.blob td.linenumbers:nth-last-child(3) { + display: none; + } + + div#cgit table.blob td.linenumbers a:target { + color: goldenrod; + text-decoration: underline; + outline: none; + } + ''; + passAsFile = ["licenseHeader" "extraCss"]; + } '' + cat $licenseHeaderPath ${cgitPkg}/cgit/cgit.css $extraCssPath > $out + ''; +in + cgitCss |
