mirror of
https://github.com/JulienMalka/snowfield.git
synced 2025-04-01 17:50:51 +02:00
33 lines
696 B
Nix
33 lines
696 B
Nix
{ lib, pkgs, config, ... }:
|
|
with lib;
|
|
let
|
|
cfg = config.luj.linkal;
|
|
port = 8443;
|
|
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}/";
|
|
};
|
|
};
|
|
|
|
};
|
|
}
|