aboutsummaryrefslogtreecommitdiff
path: root/modules/server/cgit/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/server/cgit/default.nix')
-rw-r--r--modules/server/cgit/default.nix76
1 files changed, 0 insertions, 76 deletions
diff --git a/modules/server/cgit/default.nix b/modules/server/cgit/default.nix
deleted file mode 100644
index 08784fe..0000000
--- a/modules/server/cgit/default.nix
+++ /dev/null
@@ -1,76 +0,0 @@
-{ config, pkgs, lib, ... }:
-let
- cgitWithAssets = pkgs.cgit.overrideAttrs (old: {
- pname = "cgit-with-assets";
-
- postInstall = (old.postInstall or "") + ''
- # overwrite the stock files that the module aliases
- install -Dm444 ${./static/cgit.css} $out/cgit/cgit.css
- install -Dm444 ${./static/logo.png} $out/cgit/cgit.png # keep the name!
- install -Dm444 ${./static/favicon.png} $out/cgit/favicon.ico
- '';
- });
-in {
- services = {
- cgit."code" = {
- enable = true;
- scanPath = "/srv/git";
- package = cgitWithAssets;
-
- settings = {
- cache-size = 0;
- cache-scanrc-ttl = 0;
- enable-log-filecount = 1;
- enable-log-linecount = 1;
- enable-git-config = 1;
-
- localtime = 1;
-
- noplainemail = 1;
-
- root-title = "code.aethrvmn.gr";
- root-desc = "αpothēke of aethrvmn";
- clone-url = "https://code.aethrvmn.gr/$CGIT_REPO_URL";
-
- logo-link = "https://aethrvmn.gr/";
-
- about-filter = "${pkgs.cgit}/lib/cgit/filters/about-formatting.sh";
- source-filter = "${pkgs.cgit}/lib/cgit/filters/syntax-highlighting.py";
- };
-
- nginx.virtualHost = "code.internal";
- };
- };
-
- users = {
- groups.git = { };
-
- users = {
- git = {
- isSystemUser = true;
- description = "aethrvmn";
- group = "git";
- home = "/srv/git";
- homeMode = "0755";
- createHome = true;
- shell = "${pkgs.git}/bin/git-shell";
-
- openssh.authorizedKeys.keys = [
- "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFTRmMBlTFJbOWQBLI9XS2HMdUSlsAcaQ6vWjLpfweEo aethrvmn@apotheke.earth"
- ];
- };
-
- cgit = {
- isSystemUser = true;
- extraGroups = [ "git" ];
- };
- };
- };
-
- systemd = {
- tmpfiles.rules = [
- # type path mode uid gid age target
- "L /srv/git/static - git git - /home/aethrvmn/.nix/modules/server/cgit/static"
- ];
- };
-}
Directive (EU) 2019/790, Article 4(3); all rights regarding Text and Data Mining (TDM) are reserved.