diff options
| author | aethrvmn <me@aethrvmn.gr> | 2025-11-30 21:59:43 +0000 |
|---|---|---|
| committer | aethrvmn <me@aethrvmn.gr> | 2025-11-30 21:59:43 +0000 |
| commit | 893ea11e1dc05fe1a2a34e66d4ebcfdffda34720 (patch) | |
| tree | ef454e299f49cbb58e1b9fbafd0b759b4379ac2a /modules/server/cgit/default.nix | |
| parent | added .lock to ignorelist (diff) | |
huge restructure of modules
Diffstat (limited to 'modules/server/cgit/default.nix')
| -rw-r--r-- | modules/server/cgit/default.nix | 76 |
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" - ]; - }; -} |
