summaryrefslogtreecommitdiff
path: root/modules/cgit.nix
diff options
context:
space:
mode:
authorLeonardo Santiago <[email protected]>2024-10-25 20:07:38 -0300
committerLeonardo Santiago <[email protected]>2024-10-25 20:07:38 -0300
commitfbbf34c7b6ba70a718abf655c0711b6ac5ff20e8 (patch)
tree5b595f587cb38272b9e23a8a0ba6fd7c95a7896b /modules/cgit.nix
parent01b442dee4d7d3d2b404a17d0e9adeb66593a54b (diff)
partial commit
Diffstat (limited to 'modules/cgit.nix')
-rw-r--r--modules/cgit.nix38
1 files changed, 38 insertions, 0 deletions
diff --git a/modules/cgit.nix b/modules/cgit.nix
new file mode 100644
index 0000000..fb894b8
--- /dev/null
+++ b/modules/cgit.nix
@@ -0,0 +1,38 @@
+{ config, lib, pkgs, ...}: with lib; {
+ options.santi-modules.services.cgit.enable = mkEnableOption "Enable cgit instance";
+ config = mkIf config.santi-modules.services.cgit.enable {
+ services.cgit.santi = let
+ org2html = pkgs.writeShellScript "org2md" ''
+ ${pkgs.pandoc}/bin/pandoc \
+ --from org \
+ --to html5 \
+ --sandbox=true \
+ --html-q-tags \
+ --ascii \
+ --standalone \
+ --wrap=auto \
+ --embed-resources \
+ -M document-css=false
+ '';
+ in {
+ enable = true;
+ user = "root";
+ group = "root";
+ settings = {
+ readme = ":README.org";
+ root-title = "index";
+ root-desc = "public repositories for santi.net.br";
+ about-filter = toString org2html;
+ enable-git-config = true;
+ enable-html-cache = false;
+ enable-blame = true;
+ enable-log-linecount = true;
+ enable-index-links = true;
+ enable-index-owner = false;
+ enable-commit-graph = true;
+ remove-suffix = true;
+ };
+ scanPath = "/home/leonardo";
+ };
+ };
+}