motiejus/config

NixOS config
git clone https://git.jakstys.lt/motiejus/config.git
Log | Tree | Refs | README | LICENSE

commit 228ea36af9634d608d98435345fa2febd27a3e2c (tree)
parent aa8e6d7b6f413ebdb67030ba633d1bcb9a915b80
Author: Motiejus Jakštys <motiejus@jakstys.lt>
Date:   Wed,  1 Jul 2026 08:46:48 +0000

stagit updates

Diffstat:
Mhosts/fwminex/configuration.nix | 1+
Mmodules/services/git/default.nix | 15++++++++-------
2 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/hosts/fwminex/configuration.nix b/hosts/fwminex/configuration.nix @@ -368,6 +368,7 @@ in enable = true; repoDir = "/var/lib/git"; wwwDir = "/var/www/git.jakstys.lt"; + baseUrl = "https://git.jakstys.lt"; sshKeys = with myData; [ people_pubkeys.motiejus people_pubkeys.motiejus_work diff --git a/modules/services/git/default.nix b/modules/services/git/default.nix @@ -12,8 +12,8 @@ let stagit = pkgs.stagit.overrideAttrs (old: { src = pkgs.fetchgit { url = "https://git.jakstys.lt/motiejus/stagit.git"; - rev = "621ad51dc6d08cb469872221725e22989d3d49f7"; - hash = "sha256-OepngIw6EQxozW/zMX6+IHhZAgv2Mrp1gw1RbMbENzc="; + rev = "f38c700759bea816e3f3c2abf561d4352c60e7c6"; + hash = "sha256-ccVl0XkzrrdLI5QJ8+yZz4IojOvXYO3HKpqDsQ0qJZk="; }; buildInputs = old.buildInputs ++ [ pkgs.sqlite ]; }); @@ -64,11 +64,7 @@ let outdir="${cfg.wwwDir}/$reponame" mkdir -p "$outdir" - (cd "$outdir" && stagit -j "$(nproc)" "$repo") || continue - - if [ ! -f "$outdir/index.html" ]; then - ln -sf log.html "$outdir/index.html" - fi + (cd "${cfg.repoDir}" && stagit -C "$outdir" -j "$(nproc)" -u "${cfg.baseUrl}/$reponame/" "''${reponame}.git") || continue for f in style.css favicon.png logo.png; do cp -f "${stagitAssets}/$f" "$outdir/$f" @@ -140,6 +136,11 @@ in enable = lib.mkEnableOption "git web hosting with stagit"; repoDir = lib.mkOption { type = str; }; wwwDir = lib.mkOption { type = str; }; + baseUrl = lib.mkOption { + type = str; + example = "https://git.jakstys.lt"; + description = "Base URL for the git web UI, used to derive clone URLs."; + }; sshKeys = lib.mkOption { type = listOf str; default = [ ];