Radicale: Difference between revisions

imported>Mic92
nicer indentation
imported>Jicksaw
Update examples to use 'settings' instead of the deprecated 'config'
Line 5: Line 5:
<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
services.radicale = {
services.radicale = {
    enable = true;
  enable = true;
    config = ''
  settings.server.hosts = [ "0.0.0.0:5232" ];
      [server]
      # Bind all interfaces on port 5232
      hosts = 0.0.0.0:5232
    '';
};
};
</syntaxhighlight>
</syntaxhighlight>


The <code>config</code> is standard Radicale configuration, see https://radicale.org/configuration/
The <code>settings</code> is standard Radicale configuration, see https://radicale.org/configuration/


== Authentication ==
== Authentication ==
Line 22: Line 18:
<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
services.radicale = {
services.radicale = {
    enable = true;
  enable = true;
    config = ''
  settings = {
      [server]
    server.hosts = [ "0.0.0.0:5232" ];
      hosts = 0.0.0.0:5232
    auth = {
 
       type = "htpasswd";
      [auth]
       htpasswd_filename = "/path/to/htpasswd/file/radicale_users";
       type = htpasswd
       htpasswd_filename = /path/to/htpasswd/file/radicale_users
       # hash function used for passwords. May be `plain` if you don't want to hash the passwords
       # hash function used for passwords. May be `plain` if you don't want to hash the passwords
       htpasswd_encryption = bcrypt
       htpasswd_encryption = "bcrypt";
     '';
     };
  };
};
};
</syntaxhighlight>
</syntaxhighlight>