aboutsummaryrefslogtreecommitdiff
path: root/virtual/packages/nextcloud.nix
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2019-01-04 17:02:27 +0100
committerIsmaël Bouya <ismael.bouya@normalesup.org>2019-01-04 17:03:19 +0100
commit5c101474d350289370105c99bbf65f8bb3a4ef39 (patch)
treed33295494241843f28ae9014033828512519acc3 /virtual/packages/nextcloud.nix
parent91493dc0e93b89a24617738ca466e12957143eb0 (diff)
downloadNix-5c101474d350289370105c99bbf65f8bb3a4ef39.tar.gz
Nix-5c101474d350289370105c99bbf65f8bb3a4ef39.tar.zst
Nix-5c101474d350289370105c99bbf65f8bb3a4ef39.zip
Bubble up the imports to the main file
Diffstat (limited to 'virtual/packages/nextcloud.nix')
-rw-r--r--virtual/packages/nextcloud.nix17
1 files changed, 8 insertions, 9 deletions
diff --git a/virtual/packages/nextcloud.nix b/virtual/packages/nextcloud.nix
index ff4b923..d332a10 100644
--- a/virtual/packages/nextcloud.nix
+++ b/virtual/packages/nextcloud.nix
@@ -1,11 +1,10 @@
1with import ../../libs.nix; 1{ stdenv, fetchurl, checkEnv, writeText, lib }:
2with nixpkgs_unstable;
3let 2let
4 nextcloud = let 3 nextcloud = let
5 # FIXME: initial sync 4 # FIXME: initial sync
6 # FIXME: backup 5 # FIXME: backup
7 buildApp = { appName, version, url, sha256, installPhase ? "mkdir -p $out && cp -R . $out/" }: 6 buildApp = { appName, version, url, sha256, installPhase ? "mkdir -p $out && cp -R . $out/" }:
8 pkgs.stdenv.mkDerivation rec { 7 stdenv.mkDerivation rec {
9 name = "nextcloud-app-${appName}-${version}"; 8 name = "nextcloud-app-${appName}-${version}";
10 inherit version; 9 inherit version;
11 phases = "unpackPhase installPhase"; 10 phases = "unpackPhase installPhase";
@@ -106,7 +105,7 @@ let
106 assert checkEnv "NIXOPS_NEXTCLOUD_INSTANCE_ID"; 105 assert checkEnv "NIXOPS_NEXTCLOUD_INSTANCE_ID";
107 assert checkEnv "NIXOPS_NEXTCLOUD_SECRET"; 106 assert checkEnv "NIXOPS_NEXTCLOUD_SECRET";
108 assert checkEnv "NIXOPS_NEXTCLOUD_REDIS_DB_INDEX"; 107 assert checkEnv "NIXOPS_NEXTCLOUD_REDIS_DB_INDEX";
109 pkgs.writeText "config.php" '' 108 writeText "config.php" ''
110 <?php 109 <?php
111 $CONFIG = array ( 110 $CONFIG = array (
112 'instanceid' => '${builtins.getEnv "NIXOPS_NEXTCLOUD_INSTANCE_ID"}', 111 'instanceid' => '${builtins.getEnv "NIXOPS_NEXTCLOUD_INSTANCE_ID"}',
@@ -183,16 +182,16 @@ let
183 rm -r $out/config 182 rm -r $out/config
184 ln -sf ${config} $out/config 183 ln -sf ${config} $out/config
185 ${builtins.concatStringsSep "\n" ( 184 ${builtins.concatStringsSep "\n" (
186 pkgs.lib.attrsets.mapAttrsToList (name: value: "ln -sf ${value} $out/apps/${name}") apps 185 lib.attrsets.mapAttrsToList (name: value: "ln -sf ${value} $out/apps/${name}") apps
187 )} 186 )}
188 ''; 187 '';
189 188
190 meta = { 189 meta = {
191 description = "Sharing solution for files, calendars, contacts and more"; 190 description = "Sharing solution for files, calendars, contacts and more";
192 homepage = https://nextcloud.com; 191 homepage = https://nextcloud.com;
193 maintainers = with stdenv.lib.maintainers; [ schneefux bachp globin fpletz ]; 192 maintainers = with lib.maintainers; [ schneefux bachp globin fpletz ];
194 license = stdenv.lib.licenses.agpl3Plus; 193 license = lib.licenses.agpl3Plus;
195 platforms = with stdenv.lib.platforms; unix; 194 platforms = with lib.platforms; unix;
196 }; 195 };
197 }; 196 };
198 activationScript = { 197 activationScript = {
@@ -229,7 +228,7 @@ let
229 phpFpm = rec { 228 phpFpm = rec {
230 basedir = builtins.concatStringsSep ":" ( 229 basedir = builtins.concatStringsSep ":" (
231 [ webRoot varDir config ] 230 [ webRoot varDir config ]
232 ++ pkgs.lib.attrsets.mapAttrsToList (name: value: value) apps); 231 ++ lib.attrsets.mapAttrsToList (name: value: value) apps);
233 socket = "/var/run/phpfpm/nextcloud.sock"; 232 socket = "/var/run/phpfpm/nextcloud.sock";
234 pool = '' 233 pool = ''
235 listen = ${socket} 234 listen = ${socket}