Add cgit config

This commit is contained in:
Maciej Jur 2023-07-19 18:13:11 +02:00
parent f9b36aee43
commit 18c8f35265
No known key found for this signature in database
GPG key ID: ADA3BF323198C639
2 changed files with 31 additions and 0 deletions

View file

@ -4,6 +4,7 @@
[
/etc/nixos/hardware-configuration.nix
./profiles/freshrss.nix
./profiles/cgit.nix
];
# Use the GRUB 2 boot loader.

View file

@ -0,0 +1,30 @@
{ config, pkgs, ... }:
let
home = "/var/lib/git";
address = "git.kamoshi.org";
in
{
users.users.git = {
isSystemUser = true;
description = "git user";
home = home;
shell = "${pkgs.git}/bin/git-shell";
openssh.authorizedKeys.keyFiles = [
/root/secrets/ssh/kamov.pub
];
};
services = {
nginx = {
enable = true;
virtualHosts."${address}" = {
forceSSL = true;
enableACME = true;
};
};
cgit."${address}" = {
enable = true;
scanPath = home;
nginx.virtualHost = address;
};
};
}