all repos

dotfiles @ e9f99e0af5e21840bd96fa9dd1488c6fd0a8ad82

i use rach linux btw

dotfiles/nix/modules/services/mugit.nix (view raw)

1
{ config, ... }: {
2
  age.secrets.github-token = {
3
    file = ../../secrets/github-token.age;
4
    owner = "git";
5
    group = "git";
6
  };
7
8
  services.caddy.virtualHosts."git.olexsmir.xyz".extraConfig = ''
9
    reverse_proxy localhost:8008
10
  '';
11
12
  services.mugit = {
13
    enable = true;
14
    exposeCli = true;
15
    config = {
16
      server.port = 8008;
17
      repo.dir = "/var/lib/mugit/";
18
      meta = {
19
        description = "hey kid, come get your free software";
20
        title = "git.olexsmir.xyz";
21
        host = "git.olexsmir.xyz";
22
      };
23
      ssh = {
24
        enable = true;
25
        keys = [
26
          "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPLLJdkVYKZgsayw+sHanKPKZbI0RMS2CakqBCEi5Trz"
27
          "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMPQ0Qz0DFB+rGrD8ScUqbUTZ1/O8FHrOBF5bIAGQgMj"
28
        ];
29
      };
30
      mirror = {
31
        enable = true;
32
        interval = "6h";
33
        github_token = "$file:" + config.age.secrets.github-token.path;
34
      };
35
    };
36
  };
37
}