aboutsummaryrefslogtreecommitdiff
path: root/nixos/machine/lipwig.nix
blob: aa3d448a5c585f2d8b6a6ae6171d4224da3a4d74 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
{ config, lib, pkgs, ... }:

with lib;

{

  config = {
    boot.isContainer = true;
    boot.loader.initScript.enable = true;

    cynerd.openvpn.enable = true;

    # Git ######################################################################
    services.gitolite = {
      enable = false;
      user = "git";
      group = "git";
      dataDir = "/var/lib/git";
      adminPubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIaMmBV0wPvG5JQIWxi20IDlLokhRBumTEbUUD9TNWoY Bootstrap gitolite key";
    };
    services.gitDaemon = {
      enable = false;
      user = "gitdemon";
      group = "gitdaemon";
      basePath = "/var/lib/git/repositories";
    };

    # CalDAV and CardDAV #######################################################
    services.radicale = {
      enable = true;
      settings = {
        server = {
          hosts = [ "0.0.0.0:5232" "[::]:5232" ];
          ssl = true;
          certificate = "/run/secrets/radicale/radicale.crt";
          key = "/run/secrets/radicale/radicale.key";
        };
        encoding = {
          request = "utf-8";
          stock = "utf-8";
        };
        auth = {
          type = "htpasswd";
          htpasswd_filename = "/run/secrets/radicale/users";
          htpasswd_encryption = "bcrypt";
          delay = 1;
        };
        storage = {
          filesystem_folder = "/var/lib/radicale/";
        };
        web = {
          type = "none";
        };
      };
    };
  };

}