server/hosts/kamoshi/profiles/cgit.nix

31 lines
582 B
Nix
Raw Normal View History

2023-07-19 18:13:11 +02:00
{ 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;
};
};
}