mirror of
https://github.com/JulienMalka/snowfield.git
synced 2025-06-08 18:09:06 +02:00
Added linkal service
This commit is contained in:
parent
49739e585e
commit
6b4b2cbe31
6 changed files with 213 additions and 28 deletions
33
modules/linkal/default.nix
Normal file
33
modules/linkal/default.nix
Normal 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}";
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue