Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

owncloud: remove server

pkgs.owncloud still pointed to owncloud 7.0.15 (from May 13 2016)

Last owncloud server update in nixpkgs was in Jun 2016.
At the same time Nextcloud forked away from it, indicating users
switched over to that.

cc @matej (original maintainer)

authored by

Florian Klink and committed by
Robin Gloster
91c65721 50500219

+6 -723
+6
nixos/doc/manual/release-notes/rl-1903.xml
··· 364 364 of maintainers. 365 365 </para> 366 366 </listitem> 367 + <listitem> 368 + <para> 369 + The owncloud server packages and httpd subservice module were removed 370 + from nixpkgs due to the lack of maintainers. 371 + </para> 372 + </listitem> 367 373 </itemizedlist> 368 374 </section> 369 375 </section>
-608
nixos/modules/services/web-servers/apache-httpd/owncloud.nix
··· 1 - { config, lib, pkgs, serverInfo, php, ... }: 2 - 3 - with lib; 4 - 5 - let 6 - 7 - owncloudConfig = pkgs.writeText "config.php" 8 - '' 9 - <?php 10 - 11 - /* Only enable this for local development and not in productive environments */ 12 - /* This will disable the minifier and outputs some additional debug informations */ 13 - define("DEBUG", false); 14 - 15 - $CONFIG = array( 16 - /* Flag to indicate ownCloud is successfully installed (true = installed) */ 17 - "installed" => true, 18 - 19 - /* Type of database, can be sqlite, mysql or pgsql */ 20 - "dbtype" => "${config.dbType}", 21 - 22 - /* Name of the ownCloud database */ 23 - "dbname" => "${config.dbName}", 24 - 25 - /* User to access the ownCloud database */ 26 - "dbuser" => "${config.dbUser}", 27 - 28 - /* Password to access the ownCloud database */ 29 - "dbpassword" => "${config.dbPassword}", 30 - 31 - /* Host running the ownCloud database. To specify a port use "HOSTNAME:####"; to specify a unix sockets use "localhost:/path/to/socket". */ 32 - "dbhost" => "${config.dbServer}", 33 - 34 - /* Prefix for the ownCloud tables in the database */ 35 - "dbtableprefix" => "", 36 - 37 - /* Force use of HTTPS connection (true = use HTTPS) */ 38 - "forcessl" => ${config.forceSSL}, 39 - 40 - /* Blacklist a specific file and disallow the upload of files with this name - WARNING: USE THIS ONLY IF YOU KNOW WHAT YOU ARE DOING. */ 41 - "blacklisted_files" => array('.htaccess'), 42 - 43 - /* The automatic hostname detection of ownCloud can fail in certain reverse proxy and CLI/cron situations. This option allows to manually override the automatic detection. You can also add a port. For example "www.example.com:88" */ 44 - "overwritehost" => "${config.overwriteHost}", 45 - 46 - /* The automatic protocol detection of ownCloud can fail in certain reverse proxy and CLI/cron situations. This option allows to manually override the protocol detection. For example "https" */ 47 - "overwriteprotocol" => "${config.overwriteProtocol}", 48 - 49 - /* The automatic webroot detection of ownCloud can fail in certain reverse proxy and CLI/cron situations. This option allows to manually override the automatic detection. For example "/domain.tld/ownCloud". The value "/" can be used to remove the root. */ 50 - "overwritewebroot" => "${config.overwriteWebRoot}", 51 - 52 - /* The automatic detection of ownCloud can fail in certain reverse proxy and CLI/cron situations. This option allows to define a manually override condition as regular expression for the remote ip address. For example "^10\.0\.0\.[1-3]$" */ 53 - "overwritecondaddr" => "", 54 - 55 - /* A proxy to use to connect to the internet. For example "myproxy.org:88" */ 56 - "proxy" => "", 57 - 58 - /* The optional authentication for the proxy to use to connect to the internet. The format is: [username]:[password] */ 59 - "proxyuserpwd" => "", 60 - 61 - /* List of trusted domains, to prevent host header poisoning ownCloud is only using these Host headers */ 62 - ${if config.trustedDomain != "" then "'trusted_domains' => array('${config.trustedDomain}')," else ""} 63 - 64 - /* Theme to use for ownCloud */ 65 - "theme" => "", 66 - 67 - /* Optional ownCloud default language - overrides automatic language detection on public pages like login or shared items. This has no effect on the user's language preference configured under "personal -> language" once they have logged in */ 68 - "default_language" => "${config.defaultLang}", 69 - 70 - /* Path to the parent directory of the 3rdparty directory */ 71 - "3rdpartyroot" => "", 72 - 73 - /* URL to the parent directory of the 3rdparty directory, as seen by the browser */ 74 - "3rdpartyurl" => "", 75 - 76 - /* Default app to open on login. 77 - * This can be a comma-separated list of app ids. 78 - * If the first app is not enabled for the current user, 79 - * it will try with the second one and so on. If no enabled app could be found, 80 - * the "files" app will be displayed instead. */ 81 - "defaultapp" => "${config.defaultApp}", 82 - 83 - /* Enable the help menu item in the settings */ 84 - "knowledgebaseenabled" => true, 85 - 86 - /* Enable installing apps from the appstore */ 87 - "appstoreenabled" => ${config.appStoreEnable}, 88 - 89 - /* URL of the appstore to use, server should understand OCS */ 90 - "appstoreurl" => "https://api.owncloud.com/v1", 91 - 92 - /* Domain name used by ownCloud for the sender mail address, e.g. no-reply@example.com */ 93 - "mail_domain" => "${config.mailFromDomain}", 94 - 95 - /* FROM address used by ownCloud for the sender mail address, e.g. owncloud@example.com 96 - This setting overwrites the built in 'sharing-noreply' and 'lostpassword-noreply' 97 - FROM addresses, that ownCloud uses 98 - */ 99 - "mail_from_address" => "${config.mailFrom}", 100 - 101 - /* Enable SMTP class debugging */ 102 - "mail_smtpdebug" => false, 103 - 104 - /* Mode to use for sending mail, can be sendmail, smtp, qmail or php, see PHPMailer docs */ 105 - "mail_smtpmode" => "${config.SMTPMode}", 106 - 107 - /* Host to use for sending mail, depends on mail_smtpmode if this is used */ 108 - "mail_smtphost" => "${config.SMTPHost}", 109 - 110 - /* Port to use for sending mail, depends on mail_smtpmode if this is used */ 111 - "mail_smtpport" => ${config.SMTPPort}, 112 - 113 - /* SMTP server timeout in seconds for sending mail, depends on mail_smtpmode if this is used */ 114 - "mail_smtptimeout" => ${config.SMTPTimeout}, 115 - 116 - /* SMTP connection prefix or sending mail, depends on mail_smtpmode if this is used. 117 - Can be "", ssl or tls */ 118 - "mail_smtpsecure" => "${config.SMTPSecure}", 119 - 120 - /* authentication needed to send mail, depends on mail_smtpmode if this is used 121 - * (false = disable authentication) 122 - */ 123 - "mail_smtpauth" => ${config.SMTPAuth}, 124 - 125 - /* authentication type needed to send mail, depends on mail_smtpmode if this is used 126 - * Can be LOGIN (default), PLAIN or NTLM */ 127 - "mail_smtpauthtype" => "${config.SMTPAuthType}", 128 - 129 - /* Username to use for sendmail mail, depends on mail_smtpauth if this is used */ 130 - "mail_smtpname" => "${config.SMTPUser}", 131 - 132 - /* Password to use for sendmail mail, depends on mail_smtpauth if this is used */ 133 - "mail_smtppassword" => "${config.SMTPPass}", 134 - 135 - /* memcached servers (Only used when xCache, APC and APCu are absent.) */ 136 - "memcached_servers" => array( 137 - // hostname, port and optional weight. Also see: 138 - // http://www.php.net/manual/en/memcached.addservers.php 139 - // http://www.php.net/manual/en/memcached.addserver.php 140 - //array('localhost', 11211), 141 - //array('other.host.local', 11211), 142 - ), 143 - 144 - /* How long should ownCloud keep deleted files in the trash bin, default value: 30 days */ 145 - 'trashbin_retention_obligation' => 30, 146 - 147 - /* Disable/Enable auto expire for the trash bin, by default auto expire is enabled */ 148 - 'trashbin_auto_expire' => true, 149 - 150 - /* allow user to change his display name, if it is supported by the back-end */ 151 - 'allow_user_to_change_display_name' => true, 152 - 153 - /* Check 3rdparty apps for malicious code fragments */ 154 - "appcodechecker" => true, 155 - 156 - /* Check if ownCloud is up to date */ 157 - "updatechecker" => true, 158 - 159 - /* Are we connected to the internet or are we running in a closed network? */ 160 - "has_internet_connection" => true, 161 - 162 - /* Check if the ownCloud WebDAV server is working correctly. Can be disabled if not needed in special situations*/ 163 - "check_for_working_webdav" => true, 164 - 165 - /* Check if .htaccess protection of data is working correctly. Can be disabled if not needed in special situations*/ 166 - "check_for_working_htaccess" => true, 167 - 168 - /* Place to log to, can be owncloud and syslog (owncloud is log menu item in admin menu) */ 169 - "log_type" => "owncloud", 170 - 171 - /* File for the owncloud logger to log to, (default is ownloud.log in the data dir) */ 172 - "logfile" => "${config.dataDir}/owncloud.log", 173 - 174 - /* Loglevel to start logging at. 0=DEBUG, 1=INFO, 2=WARN, 3=ERROR (default is WARN) */ 175 - "loglevel" => "2", 176 - 177 - /* date format to be used while writing to the owncloud logfile */ 178 - 'logdateformat' => 'F d, Y H:i:s', 179 - 180 - ${tzSetting} 181 - 182 - /* Append all database queries and parameters to the log file. 183 - (watch out, this option can increase the size of your log file)*/ 184 - "log_query" => false, 185 - 186 - /* Whether ownCloud should log the last successfull cron exec */ 187 - "cron_log" => true, 188 - 189 - /* 190 - * Configure the size in bytes log rotation should happen, 0 or false disables the rotation. 191 - * This rotates the current owncloud logfile to a new name, this way the total log usage 192 - * will stay limited and older entries are available for a while longer. The 193 - * total disk usage is twice the configured size. 194 - * WARNING: When you use this, the log entries will eventually be lost. 195 - */ 196 - 'log_rotate_size' => "104857600", // 104857600, // 100 MiB 197 - 198 - /* Lifetime of the remember login cookie, default is 15 days */ 199 - "remember_login_cookie_lifetime" => 1296000, 200 - 201 - /* Life time of a session after inactivity */ 202 - "session_lifetime" => 86400, 203 - 204 - /* 205 - * Enable/disable session keep alive when a user is logged in in the Web UI. 206 - * This is achieved by sending a "heartbeat" to the server to prevent 207 - * the session timing out. 208 - */ 209 - "session_keepalive" => true, 210 - 211 - /* Custom CSP policy, changing this will overwrite the standard policy */ 212 - "custom_csp_policy" => "default-src 'self'; script-src 'self' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; frame-src *; img-src *; font-src 'self' data:; media-src *", 213 - 214 - /* Enable/disable X-Frame-Restriction */ 215 - /* HIGH SECURITY RISK IF DISABLED*/ 216 - "xframe_restriction" => true, 217 - 218 - /* The directory where the user data is stored, default to data in the owncloud 219 - * directory. The sqlite database is also stored here, when sqlite is used. 220 - */ 221 - "datadirectory" => "${config.dataDir}/storage", 222 - 223 - /* The directory where the skeleton files are located. These files will be copied to the data 224 - * directory of new users. Leave empty to not copy any skeleton files. 225 - */ 226 - // "skeletondirectory" => "", 227 - 228 - /* Enable maintenance mode to disable ownCloud 229 - If you want to prevent users to login to ownCloud before you start doing some maintenance work, 230 - you need to set the value of the maintenance parameter to true. 231 - Please keep in mind that users who are already logged-in are kicked out of ownCloud instantly. 232 - */ 233 - "maintenance" => false, 234 - 235 - "apps_paths" => array( 236 - 237 - /* Set an array of path for your apps directories 238 - key 'path' is for the fs path and the key 'url' is for the http path to your 239 - applications paths. 'writable' indicates whether the user can install apps in this folder. 240 - You must have at least 1 app folder writable or you must set the parameter 'appstoreenabled' to false 241 - */ 242 - array( 243 - 'path'=> '${config.dataDir}/apps', 244 - 'url' => '/apps', 245 - 'writable' => true, 246 - ), 247 - ), 248 - 'user_backends'=>array( 249 - /* 250 - array( 251 - 'class'=>'OC_User_IMAP', 252 - 'arguments'=>array('{imap.gmail.com:993/imap/ssl}INBOX') 253 - ) 254 - */ 255 - ), 256 - //links to custom clients 257 - 'customclient_desktop' => ''', //http://owncloud.org/sync-clients/ 258 - 'customclient_android' => ''', //https://play.google.com/store/apps/details?id=com.owncloud.android 259 - 'customclient_ios' => ''', //https://itunes.apple.com/us/app/owncloud/id543672169?mt=8 260 - 261 - // PREVIEW 262 - 'enable_previews' => true, 263 - /* the max width of a generated preview, if value is null, there is no limit */ 264 - 'preview_max_x' => null, 265 - /* the max height of a generated preview, if value is null, there is no limit */ 266 - 'preview_max_y' => null, 267 - /* the max factor to scale a preview, default is set to 10 */ 268 - 'preview_max_scale_factor' => 10, 269 - /* custom path for libreoffice / openoffice binary */ 270 - 'preview_libreoffice_path' => '${config.libreofficePath}', 271 - /* cl parameters for libreoffice / openoffice */ 272 - 'preview_office_cl_parameters' => ''', 273 - 274 - /* whether avatars should be enabled */ 275 - 'enable_avatars' => true, 276 - 277 - // Extra SSL options to be used for configuration 278 - 'openssl' => array( 279 - 'config' => '/etc/ssl/openssl.cnf', 280 - ), 281 - 282 - // default cipher used for file encryption, currently we support AES-128-CFB and AES-256-CFB 283 - 'cipher' => 'AES-256-CFB', 284 - 285 - /* whether usage of the instance should be restricted to admin users only */ 286 - 'singleuser' => false, 287 - 288 - /* all css and js files will be served by the web server statically in one js file and ons css file*/ 289 - 'asset-pipeline.enabled' => false, 290 - 291 - /* where mount.json file should be stored, defaults to data/mount.json */ 292 - 'mount_file' => ''', 293 - 294 - /* 295 - * Location of the cache folder, defaults to "data/$user/cache" where "$user" is the current user. 296 - * 297 - * When specified, the format will change to "$cache_path/$user" where "$cache_path" is the configured 298 - * cache directory and "$user" is the user. 299 - * 300 - */ 301 - 'cache_path' => ''', 302 - 303 - /* EXPERIMENTAL: option whether to include external storage in quota calculation, defaults to false */ 304 - 'quota_include_external_storage' => false, 305 - 306 - /* 307 - * specifies how often the filesystem is checked for changes made outside owncloud 308 - * 0 -> never check the filesystem for outside changes, provides a performance increase when it's certain that no changes are made directly to the filesystem 309 - * 1 -> check each file or folder at most once per request, recomended for general use if outside changes might happen 310 - * 2 -> check every time the filesystem is used, causes a performance hit when using external storages, not recomended for regular use 311 - */ 312 - 'filesystem_check_changes' => 1, 313 - 314 - /* If true, prevent owncloud from changing the cache due to changes in the filesystem for all storage */ 315 - 'filesystem_cache_readonly' => false, 316 - 317 - /** 318 - * define default folder for shared files and folders 319 - */ 320 - 'share_folder' => '/', 321 - 322 - 'version' => '${config.package.version}', 323 - 324 - 'openssl' => '${pkgs.openssl.bin}/bin/openssl' 325 - 326 - ); 327 - 328 - ''; 329 - 330 - tzSetting = let tz = serverInfo.fullConfig.time.timeZone; in optionalString (!isNull tz) '' 331 - /* timezone used while writing to the owncloud logfile (default: UTC) */ 332 - 'logtimezone' => '${tz}', 333 - ''; 334 - 335 - postgresql = serverInfo.fullConfig.services.postgresql.package; 336 - 337 - setupDb = pkgs.writeScript "setup-owncloud-db" '' 338 - #!${pkgs.runtimeShell} 339 - PATH="${postgresql}/bin" 340 - createuser --no-superuser --no-createdb --no-createrole "${config.dbUser}" || true 341 - createdb "${config.dbName}" -O "${config.dbUser}" || true 342 - psql -U postgres -d postgres -c "alter user ${config.dbUser} with password '${config.dbPassword}';" || true 343 - 344 - QUERY="CREATE TABLE appconfig 345 - ( appid VARCHAR( 255 ) NOT NULL 346 - , configkey VARCHAR( 255 ) NOT NULL 347 - , configvalue VARCHAR( 255 ) NOT NULL 348 - ); 349 - GRANT ALL ON appconfig TO ${config.dbUser}; 350 - ALTER TABLE appconfig OWNER TO ${config.dbUser};" 351 - 352 - psql -h "/tmp" -U postgres -d ${config.dbName} -Atw -c "$QUERY" || true 353 - ''; 354 - 355 - in 356 - 357 - rec { 358 - 359 - extraConfig = 360 - '' 361 - ${if config.urlPrefix != "" then "Alias ${config.urlPrefix} ${config.package}" else '' 362 - 363 - RewriteEngine On 364 - RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f 365 - RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d 366 - ''} 367 - 368 - <Directory ${config.package}> 369 - Include ${config.package}/.htaccess 370 - </Directory> 371 - ''; 372 - 373 - globalEnvVars = [ 374 - { name = "OC_CONFIG_PATH"; value = "${config.dataDir}/config/"; } 375 - ]; 376 - 377 - documentRoot = if config.urlPrefix == "" then config.package else null; 378 - 379 - enablePHP = true; 380 - 381 - options = { 382 - 383 - package = mkOption { 384 - type = types.package; 385 - default = pkgs.owncloud70; 386 - defaultText = "pkgs.owncloud70"; 387 - example = literalExample "pkgs.owncloud70"; 388 - description = '' 389 - ownCloud package to use. 390 - ''; 391 - }; 392 - 393 - urlPrefix = mkOption { 394 - default = ""; 395 - example = "/owncloud"; 396 - description = '' 397 - The URL prefix under which the owncloud service appears. 398 - ''; 399 - }; 400 - 401 - id = mkOption { 402 - default = "main"; 403 - description = '' 404 - A unique identifier necessary to keep multiple owncloud server 405 - instances on the same machine apart. This is used to 406 - disambiguate the administrative scripts, which get names like 407 - mediawiki-$id-change-password. 408 - ''; 409 - }; 410 - 411 - adminUser = mkOption { 412 - default = "owncloud"; 413 - description = "The admin user name for accessing owncloud."; 414 - }; 415 - 416 - adminPassword = mkOption { 417 - description = "The admin password for accessing owncloud."; 418 - }; 419 - 420 - dbType = mkOption { 421 - default = "pgsql"; 422 - description = "Type of database, in NixOS, for now, only pgsql."; 423 - }; 424 - 425 - dbName = mkOption { 426 - default = "owncloud"; 427 - description = "Name of the database that holds the owncloud data."; 428 - }; 429 - 430 - dbServer = mkOption { 431 - default = "localhost:5432"; 432 - description = '' 433 - The location of the database server. 434 - ''; 435 - }; 436 - 437 - dbUser = mkOption { 438 - default = "owncloud"; 439 - description = "The user name for accessing the database."; 440 - }; 441 - 442 - dbPassword = mkOption { 443 - example = "foobar"; 444 - description = '' 445 - The password of the database user. Warning: this is stored in 446 - cleartext in the Nix store! 447 - ''; 448 - }; 449 - 450 - forceSSL = mkOption { 451 - default = "false"; 452 - description = "Force use of HTTPS connection."; 453 - }; 454 - 455 - adminAddr = mkOption { 456 - default = serverInfo.serverConfig.adminAddr; 457 - example = "admin@example.com"; 458 - description = '' 459 - Emergency contact e-mail address. Defaults to the Apache 460 - admin address. 461 - ''; 462 - }; 463 - 464 - siteName = mkOption { 465 - default = "owncloud"; 466 - example = "Foobar owncloud"; 467 - description = "Name of the owncloud"; 468 - }; 469 - 470 - trustedDomain = mkOption { 471 - default = ""; 472 - description = "Trusted domain"; 473 - }; 474 - 475 - defaultLang = mkOption { 476 - default = ""; 477 - description = "Default language"; 478 - }; 479 - 480 - defaultApp = mkOption { 481 - default = ""; 482 - description = "Default application"; 483 - }; 484 - 485 - appStoreEnable = mkOption { 486 - default = "true"; 487 - description = "Enable app store"; 488 - }; 489 - 490 - mailFrom = mkOption { 491 - default = "no-reply"; 492 - description = "Mail from"; 493 - }; 494 - 495 - mailFromDomain = mkOption { 496 - default = "example.xyz"; 497 - description = "Mail from domain"; 498 - }; 499 - 500 - SMTPMode = mkOption { 501 - default = "smtp"; 502 - description = "Which mode to use for sending mail: sendmail, smtp, qmail or php."; 503 - }; 504 - 505 - SMTPHost = mkOption { 506 - default = ""; 507 - description = "SMTP host"; 508 - }; 509 - 510 - SMTPPort = mkOption { 511 - default = "25"; 512 - description = "SMTP port"; 513 - }; 514 - 515 - SMTPTimeout = mkOption { 516 - default = "10"; 517 - description = "SMTP mode"; 518 - }; 519 - 520 - SMTPSecure = mkOption { 521 - default = "ssl"; 522 - description = "SMTP secure"; 523 - }; 524 - 525 - SMTPAuth = mkOption { 526 - default = "true"; 527 - description = "SMTP auth"; 528 - }; 529 - 530 - SMTPAuthType = mkOption { 531 - default = "LOGIN"; 532 - description = "SMTP auth type"; 533 - }; 534 - 535 - SMTPUser = mkOption { 536 - default = ""; 537 - description = "SMTP user"; 538 - }; 539 - 540 - SMTPPass = mkOption { 541 - default = ""; 542 - description = "SMTP pass"; 543 - }; 544 - 545 - dataDir = mkOption { 546 - default = "/var/lib/owncloud"; 547 - description = "Data dir"; 548 - }; 549 - 550 - libreofficePath = mkOption { 551 - default = "/usr/bin/libreoffice"; 552 - description = "Path for LibreOffice/OpenOffice binary."; 553 - }; 554 - 555 - overwriteHost = mkOption { 556 - default = ""; 557 - description = "The automatic hostname detection of ownCloud can fail in 558 - certain reverse proxy and CLI/cron situations. This option allows to 559 - manually override the automatic detection. You can also add a port."; 560 - }; 561 - 562 - overwriteProtocol = mkOption { 563 - default = ""; 564 - description = "The automatic protocol detection of ownCloud can fail in 565 - certain reverse proxy and CLI/cron situations. This option allows to 566 - manually override the protocol detection."; 567 - }; 568 - 569 - overwriteWebRoot = mkOption { 570 - default = ""; 571 - description = "The automatic webroot detection of ownCloud can fail in 572 - certain reverse proxy and CLI/cron situations. This option allows to 573 - manually override the automatic detection."; 574 - }; 575 - 576 - }; 577 - 578 - startupScript = pkgs.writeScript "owncloud_startup.sh" '' 579 - 580 - if [ ! -d ${config.dataDir}/config ]; then 581 - mkdir -p ${config.dataDir}/config 582 - cp ${owncloudConfig} ${config.dataDir}/config/config.php 583 - mkdir -p ${config.dataDir}/storage 584 - mkdir -p ${config.dataDir}/apps 585 - cp -r ${config.package}/apps/* ${config.dataDir}/apps/ 586 - chmod -R ug+rw ${config.dataDir} 587 - chmod -R o-rwx ${config.dataDir} 588 - chown -R wwwrun:wwwrun ${config.dataDir} 589 - 590 - ${pkgs.sudo}/bin/sudo -u postgres ${setupDb} 591 - fi 592 - 593 - if [ -e ${config.package}/config/ca-bundle.crt ]; then 594 - cp -f ${config.package}/config/ca-bundle.crt ${config.dataDir}/config/ 595 - fi 596 - 597 - ${php}/bin/php ${config.package}/occ upgrade >> ${config.dataDir}/upgrade.log || true 598 - 599 - chown wwwrun:wwwrun ${config.dataDir}/owncloud.log || true 600 - 601 - QUERY="INSERT INTO groups (gid) values('admin'); 602 - INSERT INTO users (uid,password) 603 - values('${config.adminUser}','${builtins.hashString "sha1" config.adminPassword}'); 604 - INSERT INTO group_user (gid,uid) 605 - values('admin','${config.adminUser}');" 606 - ${pkgs.sudo}/bin/sudo -u postgres ${postgresql}/bin/psql -h "/tmp" -U postgres -d ${config.dbName} -Atw -c "$QUERY" || true 607 - ''; 608 - }
-1
nixos/tests/all-tests.nix
··· 156 156 openssh = handleTest ./openssh.nix {}; 157 157 osquery = handleTest ./osquery.nix {}; 158 158 ostree = handleTest ./ostree.nix {}; 159 - owncloud = handleTest ./owncloud.nix {}; 160 159 pam-oath-login = handleTest ./pam-oath-login.nix {}; 161 160 peerflix = handleTest ./peerflix.nix {}; 162 161 pgjwt = handleTest ./pgjwt.nix {};
-39
nixos/tests/owncloud.nix
··· 1 - import ./make-test.nix ({ ... }: 2 - 3 - { 4 - name = "owncloud"; 5 - nodes = 6 - { web = 7 - { ... }: 8 - { 9 - services.postgresql.enable = true; 10 - services.httpd = { 11 - enable = true; 12 - logPerVirtualHost = true; 13 - adminAddr = "example@example.com"; 14 - virtualHosts = [ 15 - { 16 - hostName = "owncloud"; 17 - extraSubservices = 18 - [ 19 - { 20 - serviceType = "owncloud"; 21 - adminPassword = "secret"; 22 - dbPassword = "secret"; 23 - } 24 - ]; 25 - } 26 - ]; 27 - }; 28 - }; 29 - }; 30 - 31 - testScript = '' 32 - startAll; 33 - 34 - $web->waitForUnit("postgresql"); 35 - $web->waitForUnit("httpd"); 36 - 37 - $web->succeed("curl -L 127.0.0.1:80"); 38 - ''; 39 - })
-65
pkgs/servers/owncloud/default.nix
··· 1 - { stdenv, fetchurl }: 2 - let 3 - common = { versiona, sha256 }: stdenv.mkDerivation (rec { 4 - 5 - name= "owncloud-${version}"; 6 - version= versiona; 7 - 8 - src = fetchurl { 9 - url = "https://download.owncloud.org/community/${name}.tar.bz2"; 10 - inherit sha256; 11 - }; 12 - 13 - installPhase = 14 - '' 15 - mkdir -p $out 16 - find . -maxdepth 1 -execdir cp -r '{}' $out \; 17 - 18 - substituteInPlace $out/lib/base.php \ 19 - --replace 'OC_Config::$object = new \OC\Config(self::$configDir);' \ 20 - 'self::$configDir = getenv("OC_CONFIG_PATH"); OC_Config::$object = new \OC\Config(self::$configDir);' 21 - ''; 22 - 23 - meta = { 24 - description = "An enterprise file sharing solution for online collaboration and storage"; 25 - homepage = https://owncloud.org; 26 - maintainers = with stdenv.lib.maintainers; [ matejc ]; 27 - license = stdenv.lib.licenses.agpl3Plus; 28 - platforms = with stdenv.lib.platforms; unix; 29 - }; 30 - 31 - }); 32 - 33 - in { 34 - 35 - owncloud70 = common { 36 - versiona = "7.0.15"; 37 - sha256 = "1b2a0fccxlkqyyzsymx7qw8qbhsks3i6h1ybvxv8nn8hgw33nqv7"; 38 - }; 39 - 40 - owncloud80 = common { 41 - versiona = "8.0.16"; 42 - sha256 = "1pgfawrmx6n02h7h6g5wk0sa1kgablqa8ljfiywyw8znxxa5lnrm"; 43 - }; 44 - 45 - owncloud81 = common { 46 - versiona = "8.1.11"; 47 - sha256 = "04izfzj3ckcs0x882kkggp6y7zcrhdihm71wkd9vk6j5fn8k9am0"; 48 - }; 49 - 50 - owncloud82 = common { 51 - versiona = "8.2.9"; 52 - sha256 = "09gzpxd9gjg8h57m8j0r6xnr85fdb951ykwmjby811c6730769pw"; 53 - }; 54 - 55 - owncloud90 = common { 56 - versiona = "9.0.7"; 57 - sha256 = "1j6xrd4dhc0v0maa3z8n392nfc9hrnvbxxyqr8g8kz88w9vbqa6h"; 58 - }; 59 - 60 - owncloud91 = common { 61 - versiona = "9.1.3"; 62 - sha256 = "1sgnsj2ng14lh05n5kc3jv03xk6xnkyx7xj1rasxlqgvzwsyp8g0"; 63 - }; 64 - 65 - }
-10
pkgs/top-level/all-packages.nix
··· 4665 4665 4666 4666 overmind = callPackage ../applications/misc/overmind { }; 4667 4667 4668 - owncloud = owncloud70; 4669 - 4670 - inherit (callPackages ../servers/owncloud { }) 4671 - owncloud70 4672 - owncloud80 4673 - owncloud81 4674 - owncloud82 4675 - owncloud90 4676 - owncloud91; 4677 - 4678 4668 owncloud-client = libsForQt5.callPackage ../applications/networking/owncloud-client { }; 4679 4669 4680 4670 oxidized = callPackage ../tools/admin/oxidized { };