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 keepassxc
obs-studio obs-studio
betaflight-configurator betaflight-configurator
yubioath-flutter
# #
# Style # Style

View File

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

View File

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

View File

@ -43,6 +43,10 @@ in
default = false; default = false;
description = "Whether to enable syncThing host on this machine"; description = "Whether to enable syncThing host on this machine";
}; };
caldavEnable = lib.mkOption {
default = false;
description = "Enable the caldav server service (radicale)";
};
}; };
imports = [ 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" = { systemd.timers."pixel-backups" = {
wantedBy = [ "timers.target" ]; wantedBy = [ "timers.target" ];
timerConfig = { timerConfig = {