anchor.diff:    pythonEnv = pkgs.python3.withPackages (ps: with ps;
       [ etebase-server daphne ]);
   
  -  dbConfig = {
  -    sqlite3 = ''
  -      engine = django.db.backends.sqlite3
  -      name = ${cfg.dataDir}/db.sqlite3
  -    '';
  -  };
  -
  -  defaultConfigIni = toString (pkgs.writeText "etebase-server.ini" ''
  -    [global]
  -    debug = false
  -    secret_file = ${if cfg.secretFile != null then cfg.secretFile else ""}
  -    media_root = ${cfg.dataDir}/media
  -
  -    [allowed_hosts]
  -    allowed_host1 = ${cfg.host}
  -
  -    [database]
  -    ${dbConfig."${cfg.database.type}"}
  -  '');
  -
  -  configIni = if cfg.customIni != null then cfg.customIni else defaultConfigIni;
  +  iniFmt = pkgs.formats.ini {};
  +
  +  configIni = iniFmt.generate "etebase-server.ini" cfg.settings;
   
     defaultUser = "etebase-server";
   in
   {
  +  imports = [
  +    (mkRemovedOptionModule
  +      [ "services" "etebase-server" "customIni" ]
  +      "Set the option `services.etebase-server.settings' instead.")
  +    (mkRemovedOptionModule
  +      [ "services" "etebase-server" "database" ]
  +      "Set the option `services.etebase-server.settings.database' instead.")
  +    (mkRenamedOptionModule
  +      [ "services" "etebase-server" "secretFile" ]
  +      [ "services" "etebase-server" "settings" "secret_file" ])
  +    (mkRenamedOptionModule
  +      [ "services" "etebase-server" "host" ]
  +      [ "services" "etebase-server" "settings" "allowed_hosts" "allowed_host1" ])
  +  ];
  +
     options = {
       services.etebase-server = {
         enable = mkOption {
  
positive.code:         description = ''
            Whether to enable the Etebase server.
  
            Once enabled you need to create an admin user using the
            shell command <literal>etebase-server createsuperuser</literal>.
            Then you can login and create accounts on your-etebase-server.com/admin
          '';
        };
  
        secretFile = mkOption {
          default = null;
          type = with types; nullOr str;
          description = ''
            The path to a file containing the secret
            used as django's SECRET_KEY.
          '';
        };
  
  
negative.code:         '';
        };
  
        unixSocket = mkOption {
          type = with types; nullOr str;
          default = null;
  