summaryrefslogtreecommitdiffstats
path: root/krebs/2configs/cal.nix
blob: 90093e8eb41b443fd380302b2d6da4e8895c5954 (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
{ config, lib, pkgs, ... }:
{
  users.users.testing = {
    uid = pkgs.stockholm.lib.genid_uint31 "testing";
    isNormalUser = true;
    openssh.authorizedKeys.keys = [
      config.krebs.users.xkey.pubkey
      config.krebs.users.lass.pubkey
    ];
    packages = [
      pkgs.calendar-cli
      pkgs.tmux
    ];
  };

  services.xandikos = {
    enable = true;
    extraOptions = [
      "--autocreate"
      "--defaults"
      "--current-user-principal /krebs"
      "--dump-dav-xml"
    ];
  };

  services.nginx = {
    enable = true;

    virtualHosts = {
      "calendar.r".locations."/".proxyPass = "http://localhost:${toString config.services.xandikos.port}/";
    };
  };
}