X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=virtual%2Fpackages.nix;h=d9656f7b501ed639d91f58da32e2afa4b73ad205;hb=7611e4e2ace4355ec4397a675883890927a13c7c;hp=c257dab0a60b3e8ee3167be8e42ebca76242b48c;hpb=1bb2ff2cfbffcdc571bc2f8b171ca892c8aebece;p=perso%2FImmae%2FConfig%2FNix.git diff --git a/virtual/packages.nix b/virtual/packages.nix index c257dab..d9656f7 100644 --- a/virtual/packages.nix +++ b/virtual/packages.nix @@ -1,68 +1,17 @@ -with import (builtins.fetchTarball { - # FIXME: upgrade to nixpkgs 19 when stable and stick to stable - # versions - name = "nixos-unstable-2018-12-08"; - url = https://github.com/nixos/nixpkgs/archive/61c3169a0e17d789c566d5b241bfe309ce4a6275.tar.gz; - sha256 = "0qbycg7wkb71v20rchlkafrjfpbk2fnlvvbh3ai9pyfisci5wxvq"; -}) {}; +with import ../libs.nix; +with nixpkgs_unstable; let - adminer = rec { - webRoot = pkgs.stdenv.mkDerivation rec { - version = "4.7.0"; - name = "adminer-${version}"; - src = pkgs.fetchurl { - url = "https://www.adminer.org/static/download/${version}/${name}.php"; - sha256 = "1qq2g7rbfh2vrqfm3g0bz0qs057b049n0mhabnsbd1sgnpvnc5z7"; - }; - phases = "installPhase"; - installPhase = '' - mkdir -p $out - cp $src $out/index.php - ''; - }; - phpFpm = rec { - socket = "/var/run/phpfpm/adminer.sock"; - pool = '' - listen = ${socket} - user = ${apache.user} - group = ${apache.group} - listen.owner = ${apache.user} - listen.group = ${apache.group} - pm = ondemand - pm.max_children = 5 - pm.process_idle_timeout = 60 - ;php_admin_flag[log_errors] = on - php_admin_value[open_basedir] = "${webRoot}:/tmp" - ''; - }; - apache = { - user = "wwwrun"; - group = "wwwrun"; - vhostConf = '' - Alias /adminer ${webRoot} - - DirectoryIndex = index.php - - SetHandler "proxy:unix:${phpFpm.socket}|fcgi://localhost" - - - ''; - }; - nginxConf = { - alias = webRoot; - index = "index.php"; - extraConfig = '' - include ${pkgs.nginx}/conf/fastcgi.conf; - fastcgi_split_path_info ^(.+?\.php)(/.*)$; - fastcgi_param HTTP_PROXY ""; - fastcgi_param SCRIPT_FILENAME ${webRoot}/index.php; - fastcgi_pass unix:${phpFpm.socket}; - fastcgi_index index.php; - fastcgi_intercept_errors on; - ''; - }; - }; + connexionswing = import ./packages/connexionswing.nix; + nextcloud = import ./packages/nextcloud.nix; + adminer = import ./packages/adminer.nix; + ympd = import ./packages/ympd.nix; + gitweb = import ./packages/gitweb.nix; in { inherit adminer; + inherit ympd; + connexionswing_dev = connexionswing { environment = "dev"; }; + connexionswing_prod = connexionswing { environment = "prod"; }; + inherit nextcloud; + git = { web = gitweb; }; }