services/radicale: init
This commit is contained in:
parent
d51f76e020
commit
ce2b892880
3 changed files with 57 additions and 0 deletions
|
@ -44,6 +44,7 @@ in
|
||||||
++ optional config.services.ollama.enable "/var/lib/private/ollama"
|
++ optional config.services.ollama.enable "/var/lib/private/ollama"
|
||||||
++ optional config.programs.virt-manager.enable "/var/lib/libvirt"
|
++ optional config.programs.virt-manager.enable "/var/lib/libvirt"
|
||||||
++ optional config.networking.networkmanager.enable "/etc/NetworkManager/system-connections"
|
++ optional config.networking.networkmanager.enable "/etc/NetworkManager/system-connections"
|
||||||
|
++ optional config.services.radicale.enable config.services.radicale.settings.storage.filesystem_folder
|
||||||
++ optionals config.virtualisation.podman.enable [
|
++ optionals config.virtualisation.podman.enable [
|
||||||
"/var/lib/containers/storage"
|
"/var/lib/containers/storage"
|
||||||
"/run/containers/storage"
|
"/run/containers/storage"
|
||||||
|
|
30
services/nginx_vHosts/radicale.nix
Normal file
30
services/nginx_vHosts/radicale.nix
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
radicale = config.services.radicale;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
vHost =
|
||||||
|
if radicale.enable then
|
||||||
|
{
|
||||||
|
extraConfig = ''
|
||||||
|
location / {
|
||||||
|
proxy_pass http://127.0.0.1:5232/;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Host $host;
|
||||||
|
proxy_set_header X-Forwarded-Port $server_port;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_pass_header Authorization;
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{ };
|
||||||
|
}
|
||||||
|
.vHost
|
26
services/radicale.nix
Normal file
26
services/radicale.nix
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
mkIf (elem "radicale" config.machine.services) {
|
||||||
|
services.radicale = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.radicale3;
|
||||||
|
settings = {
|
||||||
|
server = {
|
||||||
|
hosts = [ "127.0.0.1:5232" ];
|
||||||
|
};
|
||||||
|
auth = {
|
||||||
|
type = "imap";
|
||||||
|
imap_host = "mail.ophanim.de";
|
||||||
|
};
|
||||||
|
storage = {
|
||||||
|
filesystem_folder = "/var/lib/radicale/collections";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue