mirror of
https://codeberg.org/muon/home.git
synced 2025-12-06 08:07:45 +00:00
Add cal
This commit is contained in:
parent
7d6b69cd46
commit
40888c390e
6 changed files with 57 additions and 3 deletions
46
modules/nixos/server/cal.nix
Normal file
46
modules/nixos/server/cal.nix
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
let
|
||||
cfg = config.mods.server.cal;
|
||||
port = config.mods.server.nginx.ports.cal;
|
||||
in with lib; {
|
||||
options.mods.server = {
|
||||
cal = {
|
||||
enable = mkEnableOption {
|
||||
default = false;
|
||||
description = "enables radicale server";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services.radicale = {
|
||||
enable = true;
|
||||
settings = {
|
||||
server = { hosts = [ "0.0.0.0:${toString port}" ]; };
|
||||
auth = {
|
||||
type = "htpasswd";
|
||||
htpasswd_filename = "${toString config.sops.secrets.htpasswd.path}";
|
||||
htpasswd_encryption = "bcrypt";
|
||||
};
|
||||
storage = { filesystem_folder = "/var/lib/radicale/collections"; };
|
||||
};
|
||||
rights = {
|
||||
root = {
|
||||
user = ".+";
|
||||
collection = "";
|
||||
permissions = "R";
|
||||
};
|
||||
principal = {
|
||||
user = ".+";
|
||||
collection = "{user}";
|
||||
permissions = "RW";
|
||||
};
|
||||
calendars = {
|
||||
user = ".+";
|
||||
collection = "{user}/[^/]+";
|
||||
permissions = "rw";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -17,5 +17,6 @@
|
|||
./share.nix
|
||||
./vault.nix
|
||||
./git.nix
|
||||
./cal.nix
|
||||
];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue