about summary refs log tree commit diff
path: root/modules/nixos/radicale.nix
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--modules/nixos/radicale.nix19
1 files changed, 11 insertions, 8 deletions
diff --git a/modules/nixos/radicale.nix b/modules/nixos/radicale.nix
index 588ed51..59fb4a2 100644
--- a/modules/nixos/radicale.nix
+++ b/modules/nixos/radicale.nix
@@ -5,9 +5,11 @@
   libNginx,
   ...
 }:
-with lib; let
+with lib;
+let
   cfg = config.nixfiles.modules.radicale;
-in {
+in
+{
   options.nixfiles.modules.radicale = {
     enable = mkEnableOption "Radicale";
 
@@ -18,11 +20,12 @@ in {
     };
   };
 
-  config = let
-    port = 5232;
-  in
+  config =
+    let
+      port = 5232;
+    in
     mkIf cfg.enable {
-      ark.directories = ["/var/lib/radicale"];
+      ark.directories = [ "/var/lib/radicale" ];
 
       secrets.radicale-htpasswd = {
         file = "${inputs.self}/secrets/radicale-htpasswd";
@@ -32,7 +35,7 @@ in {
 
       nixfiles.modules.nginx = {
         enable = true;
-        upstreams.radicale.servers."127.0.0.1:${toString port}" = {};
+        upstreams.radicale.servers."127.0.0.1:${toString port}" = { };
         virtualHosts.${cfg.domain} = {
           locations."/".proxyPass = "http://radicale";
           extraConfig = libNginx.config.internalOnly;
@@ -42,7 +45,7 @@ in {
       services.radicale = {
         enable = true;
         settings = {
-          server.hosts = ["127.0.0.1:${toString port}"];
+          server.hosts = [ "127.0.0.1:${toString port}" ];
           web.type = "none";
           auth = {
             type = "htpasswd";

Consider giving Nix/NixOS a try! <3