Added linkal service

This commit is contained in:
Luj 2022-09-27 06:58:08 +02:00
parent 49739e585e
commit 6b4b2cbe31
Signed by: luj
GPG key ID: 6FC74C847011FD83
6 changed files with 213 additions and 28 deletions

View file

@ -0,0 +1,33 @@
{ lib, pkgs, config, ... }:
with lib;
let
cfg = config.luj.linkal;
port = 4145;
in
{
options.luj.linkal = {
enable = mkEnableOption "activate linkal service";
};
config = mkIf cfg.enable {
systemd.services.linkal = {
description = "linkal";
wantedBy = [ "multi-user.target" ];
serviceConfig.Type = "simple";
serviceConfig.ExecStart = "${pkgs.linkal}/bin/linkal --calendar-file ${./calendars.json}";
};
luj.nginx.enable = true;
services.nginx.virtualHosts."calendar.ens.malka.sh" = {
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://localhost:${toString port}";
};
};
};
}