Add radicale to NAS

This commit is contained in:
Nathan Anderson 2024-05-15 10:17:27 -06:00
parent 2e2312fab7
commit b1bdee6fd4
5 changed files with 34 additions and 0 deletions

View File

@ -0,0 +1 @@
n8r:$apr1$HpSAv/EE$pCDM0qP2JJIY0B5aUXjS30

View File

@ -116,6 +116,7 @@
keepassxc
obs-studio
betaflight-configurator
yubioath-flutter
#
# Style

View File

@ -73,6 +73,7 @@
swaylock
swayidle
swww
tailscale-systray
wl-clipboard
waybar
wdisplays
@ -117,17 +118,24 @@
###
## Services
###
virtualisation.docker.enable = true;
services.gvfs.enable = true; # thunar mount, trash, etc
services.tumbler.enable = true; # thunar thumbnails
services.openssh.enable = true;
services.dbus.enable = true;
services.syncthing.enable = true;
services.tailscale = {
enable = true;
openFirewall = true;
};
# For betaflight configurator
services.udev.extraRules = ''
# DFU (Internal bootloader for STM32 and AT32 MCUs)
SUBSYSTEM=="usb", ATTRS{idVendor}=="2e3c", ATTRS{idProduct}=="df11", MODE="0664", GROUP="dialout"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", MODE="0664", GROUP="dialout"
'';
# For yubioath desktop
services.pcscd.enable = true;
# Audio
security.rtkit.enable = true;
services.pipewire = {

View File

@ -48,6 +48,8 @@ in
"adbusers"
# For serial interfaces
"dialout"
# For docker
"docker"
];
})
];

View File

@ -43,6 +43,10 @@ in
default = false;
description = "Whether to enable syncThing host on this machine";
};
caldavEnable = lib.mkOption {
default = false;
description = "Enable the caldav server service (radicale)";
};
};
imports = [
@ -147,6 +151,24 @@ in
# };
};
services.radicale = lib.mkIf srvConfig.caldavEnable {
enable = true;
# Run server port 5232
server = {
hosts = [ "0.0.0.0:5232" "[::]:5232" ];
};
auth = {
type = "htpasswd";
htpasswd_filename = "${config.xdg.configHome}/radicale/rad_pass";
htpasswd_encryption = "bcrypt";
};
};
# Copy radicale pass file
home.file."${config.xdg.configHome}/radicale" = lib.mkIf srvConfig.caldavEnable {
source = ../luci/modules/radicale/rad_pass;
};
systemd.timers."pixel-backups" = {
wantedBy = [ "timers.target" ];
timerConfig = {