From b726b7588d2dcf83507ed138723efed73efebe9f Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 28 Nov 2022 17:40:13 +0100 Subject: init xandikos as calendar.r --- kartei/krebs/default.nix | 1 + krebs/1systems/hotdog/config.nix | 2 ++ krebs/2configs/cal.nix | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 36 insertions(+) create mode 100644 krebs/2configs/cal.nix diff --git a/kartei/krebs/default.nix b/kartei/krebs/default.nix index b33a54f9a..6da73ff83 100644 --- a/kartei/krebs/default.nix +++ b/kartei/krebs/default.nix @@ -78,6 +78,7 @@ in { "build.r" "build.hotdog.r" "ca.r" + "calendar.r" "cgit.hotdog.r" "irc.r" "wiki.r" diff --git a/krebs/1systems/hotdog/config.nix b/krebs/1systems/hotdog/config.nix index cf07d3b4d..02749dafe 100644 --- a/krebs/1systems/hotdog/config.nix +++ b/krebs/1systems/hotdog/config.nix @@ -13,6 +13,8 @@ + + ## shackie irc bot ]; diff --git a/krebs/2configs/cal.nix b/krebs/2configs/cal.nix new file mode 100644 index 000000000..90093e8eb --- /dev/null +++ b/krebs/2configs/cal.nix @@ -0,0 +1,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}/"; + }; + }; +} -- cgit v1.2.3