git stuff

This commit is contained in:
Henri Dohmen 2025-11-01 16:20:04 +01:00
parent 97134ce956
commit 33c551c0b2
Signed by: hd
GPG key ID: AB79213B044674AE
2 changed files with 26 additions and 3 deletions

View file

@ -1,13 +1,34 @@
{ pkgs, var, ... }: { pkgs, var, ... }:
let
gitpath = "/git";
in
{ {
programs.git.enable = true; programs.git.enable = true;
users.groups.git = { }; users.groups.git = { };
users.users.git = { users.users.git = {
isSystemUser = true; isSystemUser = true;
home = "/git"; home = gitpath;
homeMode = "755";
createHome = true; createHome = true;
group = "git"; group = "git";
shell = "${pkgs.git}/bin/git-shell"; shell = "${pkgs.git}/bin/git-shell";
openssh.authorizedKeys.keys = var.ssh-keys.hd; openssh.authorizedKeys.keys = var.ssh-keys.hd;
password = "!";
};
services =
let
cgit-host = "git.lan";
in
{
nginx = {
privateVirtualHosts.${cgit-host} = { };
};
cgit."git" = {
group = "git";
enable = true;
scanPath = gitpath;
nginx.virtualHost = cgit-host;
};
}; };
} }

View file

@ -4,9 +4,11 @@ let
name = "${name}.lan"; name = "${name}.lan";
inherit value; inherit value;
}) var.wg.ips; }) var.wg.ips;
custom-hosts = { }; custom-hosts = with var.wg.ips; {
"git.lan" = roam;
};
in in
rec { rec {
hostsFile = lib.concatStringsSep "\n" (lib.mapAttrsToList (n: v: "${v}\t${n}") hosts);
hosts = lan-hosts // custom-hosts; hosts = lan-hosts // custom-hosts;
hostsFile = lib.concatStringsSep "\n" (lib.mapAttrsToList (n: v: "${v}\t${n}") hosts);
} }