Add cgit config
This commit is contained in:
parent
f9b36aee43
commit
18c8f35265
|
@ -4,6 +4,7 @@
|
||||||
[
|
[
|
||||||
/etc/nixos/hardware-configuration.nix
|
/etc/nixos/hardware-configuration.nix
|
||||||
./profiles/freshrss.nix
|
./profiles/freshrss.nix
|
||||||
|
./profiles/cgit.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# Use the GRUB 2 boot loader.
|
# Use the GRUB 2 boot loader.
|
||||||
|
|
30
hosts/kamoshi/profiles/cgit.nix
Normal file
30
hosts/kamoshi/profiles/cgit.nix
Normal 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;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue