anchor.diff:        enable = mkEnableOption "calibre-server";
   
         libraryDir = mkOption {
  -        default = "/tmp/calibre-server";
           description = ''
             The directory where the Calibre library to serve is.
             '';
  -      };
  -
  -      user = mkOption {
  -        type = types.str;
  -        default = "calibre-server";
  -        description = "User account under which calibre-server runs.";
  -      };
  -
  -      group = mkOption {
  -        type = types.str;
  -        default = "calibre-server";
  -        description = "Group account under which calibre-server runs.";
         };
   
       };
  
positive.code: 
      environment.systemPackages = [ pkgs.calibre ];
  
      users.extraUsers = optionalAttrs (cfg.user == "calibre-server") (singleton
        { name = "calibre-server";
          group = cfg.group;
          uid = config.ids.uids.calibre-server;
        });
  
      users.extraGroups = optionalAttrs (cfg.group == "calibre-server") (singleton
        { name = "calibre-server";
          gid = config.ids.gids.calibre-server;
        });
  
    };
  
  
negative.code: 
      systemd.services.calibre-server =
        {
          description = "Calibre Server";
          after = [ "network.target" ];
          wantedBy = [ "multi-user.target" ];
          serviceConfig = {
            User = "calibre-server";
            Restart = "always";
            ExecStart = "${pkgs.calibre}/bin/calibre-server --with-library=${cfg.libraryDir}";
          };
  