OpenWebCalendar
Programs and Python libraries for reading and writing calendars based on the iCalendar standard
Declared in: projects/OpenWebCalendar/default.nix
Try the service in a VM
- 
    Install Nix
    
- Bash
 - 
  
$ apt install --yes curl git jq nix 
- Bash
 - 
  
$ apt install --yes curl git jq nix 
- Bash
 - 
  
$ pacman --sync --refresh --noconfirm 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
    
- Bash
 - 
  
$ nix-build ./default.nix && ./result 
- Bash
 - 
  
$ nix-build ./default.nix && ./result 
- 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" 
- Bash
 - 
  
$ nix-build ./default.nix && ./result 
 - Missing Contribute usage instructions.
 
Options
services.open-web-calendar
- 
  
  
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_urlparameter.- Type:
 open submodule of (JSON value)- Default:
 { }- Declared in:
 - nixos/modules/services/web-apps/open-web-calendar.nix
 
 - 
  
  
The domain under which open-web-calendar is made available
- Type:
 string- Declared in:
 - nixos/modules/services/web-apps/open-web-calendar.nix
 
 - 
  
  
Whether to enable OpenWebCalendar service.
- Type:
 boolean- Default:
 false- Declared in:
 - nixos/modules/services/web-apps/open-web-calendar.nix
 
 - 
  
  
The open-web-calendar package to use.
- Type:
 package- Default:
 pkgs.open-web-calendar- Declared in:
 - nixos/modules/services/web-apps/open-web-calendar.nix
 
 - 
  
  
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:
 open submodule of attribute set of (atom (null, bool, int, float or string))- Default:
 { }- Declared in:
 - nixos/modules/services/web-apps/open-web-calendar.nix
 
 - 
  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:
 ""- Declared in:
 - nixos/modules/services/web-apps/open-web-calendar.nix
 
 
services.open-web-calendar.calendarSettings
services.open-web-calendar.domain
services.open-web-calendar.enable
services.open-web-calendar.package
services.open-web-calendar.settings
services.open-web-calendar.settings.ALLOWED_HOSTS
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 ]; }
Declared in: projects/OpenWebCalendar/example.nix
This project is funded by NLnet through these subgrants:
- Core
 - OpenWebCalendar
 - OpenWebCalendar-recurring