all repos

dotfiles @ 53bc89e

i use rach linux btw

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

Oleksandr Smirnov Oleksandr Smirnov
olexsmir@gmail.com
nix update, 22 days ago
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
        modt = "Welcome to 🐮 mugit!";
23
      };
24
      ssh = {
25
        enable = true;
26
        keys = [
27
          "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPLLJdkVYKZgsayw+sHanKPKZbI0RMS2CakqBCEi5Trz"
28
          "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMPQ0Qz0DFB+rGrD8ScUqbUTZ1/O8FHrOBF5bIAGQgMj"
29
        ];
30
      };
31
      mirror = {
32
        enable = true;
33
        interval = "6h";
34
        github_token = "$file:" + config.age.secrets.github-token.path;
35
      };
36
    };
37
  };
38
}