X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=virtual%2Fpackages.nix;h=60a333afb9df3b951a34ffbd6cc53e69a5d7bce8;hb=6c672f344e2de6852cfa97ed789726bcd54cc83c;hp=3e143a1fbf49cfe632adebfc0423c40d29fb9f1c;hpb=25fd1d16198334f678129ddcd6e77ebf7edf9b72;p=perso%2FImmae%2FConfig%2FNix.git diff --git a/virtual/packages.nix b/virtual/packages.nix index 3e143a1..60a333a 100644 --- a/virtual/packages.nix +++ b/virtual/packages.nix @@ -1,99 +1,25 @@ -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"; -}) {}; +{ callPackage, checkEnv, fetchedGitPrivate, fetchedGithub }: 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"; - modules = [ "proxy_fcgi" ]; - 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; - ''; - }; - }; - - ympd = rec { - config = { - webPort = "localhost:18001"; - mpd = { - host = "malige.home.immae.eu"; - port = 6600; - }; - }; - apache = { - vhostConf = '' - - Use LDAPConnect - Require ldap-group cn=users,cn=mpd,ou=services,dc=immae,dc=eu - Require local - - - RedirectMatch permanent "^/mpd$" "/mpd/" - - ProxyPass http://${config.webPort}/ - ProxyPassReverse http://${config.webPort}/ - ProxyPreserveHost on - - - ProxyPass ws://${config.webPort}/ws - - ''; - }; - }; + connexionswing = callPackage ./packages/connexionswing.nix { inherit checkEnv fetchedGitPrivate; }; + ludivinecassal = callPackage ./packages/ludivinecassal.nix { inherit checkEnv fetchedGitPrivate; }; + aten = callPackage ./packages/aten.nix { inherit checkEnv fetchedGitPrivate; }; + nextcloud = callPackage ./packages/nextcloud.nix { inherit checkEnv; }; + adminer = callPackage ./packages/adminer.nix {}; + ympd = callPackage ./packages/ympd.nix {}; + gitweb = callPackage ./packages/gitweb.nix {}; + mantisbt = callPackage ./packages/mantisbt.nix { inherit checkEnv fetchedGithub; }; in { inherit adminer; inherit ympd; + connexionswing_dev = connexionswing { environment = "dev"; }; + connexionswing_prod = connexionswing { environment = "prod"; }; + ludivinecassal_dev = ludivinecassal { environment = "dev"; }; + ludivinecassal_prod = ludivinecassal { environment = "prod"; }; + aten_dev = aten { environment = "dev"; }; + aten_prod = aten { environment = "prod"; }; + inherit nextcloud; + inherit mantisbt; + # FIXME: add buildbot + git = { web = gitweb; }; }