OpenWebCalendar
Programs and Python libraries for reading and writing calendars based on the iCalendar standard
Try the service in a VM
-
Install Nix
- Arch Linux
-
- Bash
-
$ pacman --sync --refresh --noconfirm curl git jq nix
- Debian
-
- Bash
-
$ apt install --yes curl git jq nix
- Ubuntu
-
- Bash
-
$ apt install --yes curl git jq nix
-
Download a configuration file
# default.nix { ngipkgs ? import (fetchTarball "https://github.com/ngi-nix/ngipkgs/tarball/main") { }, }: ngipkgs.demo-vm ( # https://github.com/NixOS/nixpkgs/blob/f34483be5ee2418a563545a56743b7b59c549935/nixos/tests/web-apps/open-web-calendar.nix { lib, ... }: let # required by module, not used serverDomain = "open-web-calendar.example.com"; servicePort = 8080; in { services.open-web-calendar = { enable = true; domain = serverDomain; calendarSettings.title = "My custom title"; }; services.nginx = { defaultHTTPListenPort = servicePort; virtualHosts."${serverDomain}" = { forceSSL = lib.mkForce false; enableACME = lib.mkForce false; }; }; networking.hosts."::1" = [ "${serverDomain}" ]; networking.firewall.allowedTCPPorts = [ servicePort ]; } )
-
Enable binary substituters
- Bash
-
$ export NIX_CONFIG='substituters = https://cache.nixos.org/ https://ngi.cachix.org/ trusted-public-keys = cache.nixos.org-1:6nchdd59x431o0gwypbmraurkbj16zpmqfgspcdshjy= ngi.cachix.org-1:n+cal72roc3qqulxihpv+tw5t42whxmmhpragkrsrow='
-
Build and run a virtual machine
- Arch Linux, Debian Sid and Ubuntu 25.04
-
- Bash
-
$ nix-build ./default.nix && ./result
- Debian 12 and Ubuntu 24.04/24.10
-
- Bash
-
$ rev=$(nix-instantiate --eval --attr sources.nixpkgs.rev https://github.com/ngi-nix/ngipkgs/archive/master.tar.gz | jq --raw-output)
$ nix-shell -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/$rev.tar.gz --packages nix --run "nix-build ./default.nix && ./result"
-
Usage Instructions
Deployment for demo purposes
Options
services.open-web-calendar
- services.open-web-calendar.calendarSettings
-
Configure the default calendar.
See the documentation options in https://open-web-calendar.quelltext.eu/host/configure/#configuring-the-default-calendar and https://github.com/niccokunzmann/open-web-calendar/blob/master/open_web_calendar/default_specification.yml.
Individual calendar instances can be further configured outside this module, by specifying the
specification_url
parameter.- Type:
JSON value
- Default:
{ }
- services.open-web-calendar.domain
-
The domain under which open-web-calendar is made available
- Type:
string
- services.open-web-calendar.enable
-
Whether to enable OpenWebCalendar service.
- Type:
boolean
- Default:
false
- services.open-web-calendar.package
-
The open-web-calendar package to use.
- Type:
package
- Default:
pkgs.open-web-calendar
- services.open-web-calendar.settings
-
Configuration for the server. These are set as environment variables to the gunicorn/flask service.
See the documentation options in https://open-web-calendar.quelltext.eu/host/configure/#configuring-the-server.
- Type:
attribute set of (atom (null, bool, int, float or string))
- Default:
{ }
- services.open-web-calendar.settings.ALLOWED_HOSTS Read-only
-
The hosts that the Open Web Calendar permits. This is required to mitigate the Host Header Injection vulnerability.
We always set this to the empty list, as Nginx already checks the Host header.
- Type:
string
- Default:
""
Examples
Enable Open Web Calendar
# https://github.com/NixOS/nixpkgs/blob/f34483be5ee2418a563545a56743b7b59c549935/nixos/tests/web-apps/open-web-calendar.nix { lib, ... }: let # required by module, not used serverDomain = "open-web-calendar.example.com"; servicePort = 8080; in { services.open-web-calendar = { enable = true; domain = serverDomain; calendarSettings.title = "My custom title"; }; services.nginx = { defaultHTTPListenPort = servicePort; virtualHosts."${serverDomain}" = { forceSSL = lib.mkForce false; enableACME = lib.mkForce false; }; }; networking.hosts."::1" = [ "${serverDomain}" ]; networking.firewall.allowedTCPPorts = [ servicePort ]; }
This project is funded by NLnet through these subgrants: