]> git.immae.eu Git - perso/Immae/Config/Nix.git/commitdiff
Upgrade nixos-unstable
authorIsmaël Bouya <ismael.bouya@normalesup.org>
Sat, 8 Aug 2020 19:40:31 +0000 (21:40 +0200)
committerIsmaël Bouya <ismael.bouya@normalesup.org>
Sat, 15 Aug 2020 22:21:02 +0000 (00:21 +0200)
16 files changed:
modules/private/mail/dovecot.nix
modules/private/system.nix
modules/private/system/dilion.nix
modules/private/websites/isabelle/aten_app/default.nix
modules/private/websites/leila/production.nix
modules/private/websites/tools/cloud/default.nix
modules/private/websites/tools/mail/default.nix
modules/private/websites/tools/tools/adminer.nix
modules/private/websites/tools/tools/default.nix
nix/sources.json
overlays/nixops/default.nix
overlays/php-packages/mysqli_patch.patch
pkgs/python-packages/buildbot/plugins/buildslist/default.nix
pkgs/status_engine/worker.nix
pkgs/webapps/mediagoblin/default.nix
pkgs/webapps/peertube/default.nix

index 0304b899cb724f7b02e483d3918b8ab9f8ad4087..aa25d1fb5531c0bbe66ba3e473bb43f865df6041 100644 (file)
@@ -69,12 +69,12 @@ in
       mailUser = "vhost";
       mailGroup = "vhost";
       createMailUser = false;
-      mailboxes = [
-        { name = "Trash";  auto = "subscribe"; specialUse = "Trash"; }
-        { name = "Junk";   auto = "subscribe"; specialUse = "Junk"; }
-        { name = "Sent";   auto = "subscribe"; specialUse = "Sent"; }
-        { name = "Drafts"; auto = "subscribe"; specialUse = "Drafts"; }
-      ];
+      mailboxes = {
+        Trash  = { auto = "subscribe"; specialUse = "Trash"; };
+        Junk   = { auto = "subscribe"; specialUse = "Junk"; };
+        Sent   = { auto = "subscribe"; specialUse = "Sent"; };
+        Drafts = { auto = "subscribe"; specialUse = "Drafts"; };
+      };
       mailLocation = "mbox:~/Mail:INBOX=~/Mail/Inbox:INDEX=~/.imap";
       sslServerCert = "/var/lib/acme/mail/fullchain.pem";
       sslServerKey = "/var/lib/acme/mail/key.pem";
index 0ab4a81df7ac6223c99d931407564102773e9fa0..bca6e19ceb836bc8abc509cb4aaa650896d60c8a 100644 (file)
@@ -54,7 +54,7 @@
             pkgs.tcpdump
             pkgs.tshark
             pkgs.tcpflow
-            pkgs.mitmproxy
+            # pkgs.mitmproxy # failing
             pkgs.nmap
             pkgs.p0f
             pkgs.socat
index a0d56cc355769d77d69db14c642aca714c893803..ca9a0521d7b0602d48518a4a5c13b8468b705b9c 100644 (file)
@@ -42,7 +42,7 @@
   };
 
   system.nssModules = [ pkgs.libvirt ];
-  system.nssHosts = lib.mkForce [ "files" "libvirt_guest" "mymachines" "dns" "myhostname" ];
+  system.nssDatabases.hosts = lib.mkForce [ "files" "libvirt_guest" "mymachines" "dns" "myhostname" ];
   programs.zsh.enable = true;
 
   users.users.backup = {
index 30d10bafa00a129322231f4637f9eba283064939..f967b9afcea3a127fa0bae3f71eed9ce50389072 100644 (file)
@@ -1,12 +1,16 @@
 { environment ? "prod"
 , varDir ? "/var/lib/aten_${environment}"
-, composerEnv, fetchgit, runCommand, nodejs, jq, libsass, python, fetchurl, yarn2nix-moretea, sources }:
+, composerEnv, fetchgit, runCommand, nodejs-10_x, jq, libsass, python, fetchurl, yarn2nix-moretea, yarn, sources }:
 let
+  yarn2nix-moretea' = yarn2nix-moretea.override({
+    yarn = yarn.override({ nodejs = nodejs-10_x; });
+    nodejs = nodejs-10_x;
+  });
   packagesource = sources.websites-isabelle-aten;
   packagejson = runCommand "package.json" { buildInputs = [ jq ]; } ''
     cat ${packagesource}/package.json | jq -r '.version = "v1.0.0"|.name="aten"' > $out
     '';
-  yarnModules = yarn2nix-moretea.mkYarnModules rec {
+  yarnModules = yarn2nix-moretea'.mkYarnModules rec {
     name = "aten-yarn";
     pname = name;
     version = "v1.0.0";
@@ -18,8 +22,8 @@ let
         buildInputs = [ libsass python ];
         postInstall = let
           nodeHeaders = fetchurl {
-            url = "https://nodejs.org/download/release/v${nodejs.version}/node-v${nodejs.version}-headers.tar.gz";
-            sha256 = "1prvrcvbyal39k9axfwjixs4wfgs1m8xy4prsl0kq0s0n7r7nxzj";
+            url = "https://nodejs.org/download/release/v${nodejs-10_x.version}/node-v${nodejs-10_x.version}-headers.tar.gz";
+            sha256 = "15hkcbs328d3rc1s14rmky8lh8d3rr86l8k0bia0ggxzwl23lj9c";
           };
         in
           ''
@@ -46,7 +50,7 @@ let
         rm -rf var/{log,cache}
         ln -sf ${varDir}/{log,cache} var/
         '';
-      buildInputs = [ yarnModules yarn2nix-moretea.yarn ];
+      buildInputs = [ yarnModules yarn2nix-moretea'.yarn ];
       passthru = {
         inherit varDir;
         inherit environment;
index 0ae789374a88ba8a4df97ca88f899b5a0c1a73d9..8385bc7f081807e8bc4693983f32ee4986cad207 100644 (file)
@@ -25,7 +25,7 @@ in {
       phpOptions = config.services.phpfpm.phpOptions + ''
         disable_functions = "mail"
       '';
-      phpPackage = pkgs.php72.withExtensions(e: pkgs.php72.enabledExtensions ++ [ e.imagick ]);
+      phpPackage = pkgs.php72.withExtensions({ enabled, all }: enabled ++ [ all.imagick ]);
       phpEnv = {
         PATH = lib.makeBinPath [ pkgs.imagemagick ];
       };
index e6f8ecb8a1b0e296f38192d919d24fb3280cb06f..50ed528a53dc1b8a35d324f729050a978d86e48f 100644 (file)
@@ -171,7 +171,7 @@ in {
       user = "wwwrun";
       group = "wwwrun";
       settings = phpFpm.pool;
-      phpPackage = pkgs.php74.withExtensions(e: pkgs.php74.enabledExtensions ++ [ e.redis e.apcu e.opcache ]);
+      phpPackage = pkgs.php74.withExtensions({ enabled, all }: enabled ++ [ all.redis all.apcu all.opcache ]);
     };
 
     services.cron = {
index 7c60ae45b110c9a0a2538ee7ffdcb7ac972b5460..4636a6cbfbbcd6b1e31b4e45345089d68b0b16bf 100644 (file)
@@ -65,7 +65,7 @@ in
       phpOptions = config.services.phpfpm.phpOptions + ''
         date.timezone = 'CET'
       '';
-      phpPackage = pkgs.php72.withExtensions(e: pkgs.php72.enabledExtensions ++ [ e.imagick ]);
+      phpPackage = pkgs.php72.withExtensions({ enabled, all }: enabled ++ [ all.imagick ]);
     };
     services.phpfpm.pools.rainloop = {
       user = "wwwrun";
index af03550b5b6f085ee7f14f32f76e79754694c453..a4ba344a7532377e6639b139388383197d9a3b7a 100644 (file)
@@ -1,4 +1,4 @@
-{ adminer, php74, php74base, myPhpPackages, lib, forcePhpSocket ? null }:
+{ adminer, php74, myPhpPackages, lib, forcePhpSocket ? null }:
 rec {
   activationScript = {
     deps = [ "httpd" ];
@@ -10,7 +10,7 @@ rec {
   phpFpm = rec {
     user = apache.user;
     group = apache.group;
-    phpPackage = php74base.withExtensions (e: (lib.remove e.mysqli php74.enabledExtensions) ++ [myPhpPackages.mysqli_pam]);
+    phpPackage = php74.withExtensions ({ enabled, all }: (lib.remove all.mysqli enabled) ++ [myPhpPackages.mysqli_pam]);
     settings = {
       "listen.owner" = apache.user;
       "listen.group" = apache.group;
index 93d11222785fd860c64dcd7320d1221f35f7b6d8..1e30eed4affaf0770ba0d6d91d5054106c93509e 100644 (file)
@@ -17,7 +17,7 @@ let
   wallabag = pkgs.callPackage ./wallabag.nix {
     wallabag = pkgs.webapps.wallabag.override {
       composerEnv = pkgs.composerEnv.override {
-        php = pkgs.php73.withExtensions(e: pkgs.php73.enabledExtensions ++ [e.tidy]);
+        php = pkgs.php73.withExtensions({ enabled, all }: enabled ++ [all.tidy]);
       };
     };
     env = config.myEnv.tools.wallabag;
@@ -324,7 +324,7 @@ in {
 
           "php_admin_value[open_basedir]" = "/run/wrappers/bin/sendmail:/var/lib/ftp/devtools.immae.eu:/tmp";
         };
-        phpPackage = pkgs.php72.withExtensions(e: pkgs.php72.enabledExtensions ++ [e.mysqli e.redis e.apcu e.opcache ]);
+        phpPackage = pkgs.php72.withExtensions({ enabled, all }: enabled ++ [all.mysqli all.redis all.apcu all.opcache ]);
       };
       adminer = adminer.phpFpm;
       ttrss = {
@@ -337,7 +337,7 @@ in {
         user = "wwwrun";
         group = "wwwrun";
         settings = wallabag.phpFpm.pool;
-        phpPackage = pkgs.php73.withExtensions(e: pkgs.php73.enabledExtensions ++ [e.tidy]);
+        phpPackage = pkgs.php73.withExtensions({ enabled, all }: enabled ++ [all.tidy]);
       };
       yourls = {
         user = "wwwrun";
index 34a3cee2c164b224562646979609282bfdc48828..016b8c47be7bffa84c81fe3b064f3252bda0f710 100644 (file)
         "homepage": "https://github.com/NixOS/nixpkgs",
         "owner": "NixOS",
         "repo": "nixpkgs-channels",
-        "rev": "fce7562cf46727fdaf801b232116bc9ce0512049",
-        "sha256": "14rvi69ji61x3z88vbn17rg5vxrnw2wbnanxb7y0qzyqrj7spapx",
+        "rev": "840c782d507d60aaa49aa9e3f6d0b0e780912742",
+        "sha256": "14q3kvnmgz19pgwyq52gxx0cs90ddf24pnplmq33pdddbb6c51zn",
         "type": "tarball",
-        "url": "https://github.com/NixOS/nixpkgs-channels/archive/fce7562cf46727fdaf801b232116bc9ce0512049.tar.gz",
+        "url": "https://github.com/NixOS/nixpkgs-channels/archive/840c782d507d60aaa49aa9e3f6d0b0e780912742.tar.gz",
         "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
     },
     "nixpkgs-nixops-next": {
         "type": "git",
         "version": "1a0c9eb-local"
     },
-    "webapps-mediagoblin": {
-        "ref": "stable",
-        "repo": "git://git.savannah.gnu.org/mediagoblin.git",
-        "rev": "cd465ebfec837a75a44c4ebd727dffe2fff6d850",
-        "type": "git",
-        "version": "cd465eb-stable"
-    },
     "webapps-surfer": {
         "ref": "master",
         "repo": "https://git.immae.eu/perso/Immae/Projets/Nodejs/Surfer.git",
index a2976850fa713518ef25f194b55dfebd61bb9b23..14aec3b3d99a8bfaf5de2a3570bf473a66f84dc2 100644 (file)
@@ -14,6 +14,7 @@ self: super: {
 
       sed -i -e '/^import sys$/s/$/; sys.tracebacklimit = 0/' scripts/nixops
       sed -i -e "/'keyFile'/s/'path'/'string'/" nixops/backends/__init__.py
+      sed -i -e "/security.initialRootPassword/d" nix/hetzner.nix
       '';
   });
 }
index 0ec3a3b59ff31ad2564ab5c77cd8a06c15b77e20..a8f03e3eb02af728e471bcbdfd02695f8cf58760 100644 (file)
@@ -1,5 +1,5 @@
---- a/mysqli_nonapi.c
-+++ b/mysqli_nonapi.c
+--- a/ext/mysqli/mysqli_nonapi.c
++++ b/ext/mysqli/mysqli_nonapi.c
 @@ -263,7 +263,7 @@ void mysqli_common_connect(INTERNAL_FUNC
        php_mysqli_set_error(mysql_errno(mysql->mysql), (char *) mysql_error(mysql->mysql));
  
index 3f77f635b48b134b59eba5f340045e4f59984915..4ab4c5474689db480f61c0263d6da98e0f03a6a6 100644 (file)
@@ -1,14 +1,18 @@
-{ stdenv, runCommand, writeScriptBin, buildBowerComponents, pythonPackages, libsass, python, fetchurl, jq, yarn, nodejs, yarn2nix-moretea, sources }:
+{ stdenv, runCommand, writeScriptBin, buildBowerComponents, pythonPackages, libsass, python, fetchurl, jq, yarn, nodejs-10_x, yarn2nix-moretea, sources }:
 let
+  yarn2nix-moretea' = yarn2nix-moretea.override({
+    yarn = yarn.override({ nodejs = nodejs-10_x; });
+    nodejs = nodejs-10_x;
+  });
   buildslist_src = sources.buildbot-plugin-buildslist;
   packagejson = runCommand "package.json" { buildInputs = [ jq ]; } ''
     cat ${buildslist_src}/package.json | jq -r '.version = "${pythonPackages.buildbot-pkg.version}"|.license= "MIT"' > $out
     '';
   nodeHeaders = fetchurl {
-    url = "https://nodejs.org/download/release/v${nodejs.version}/node-v${nodejs.version}-headers.tar.gz";
-    sha256 = "1prvrcvbyal39k9axfwjixs4wfgs1m8xy4prsl0kq0s0n7r7nxzj";
+    url = "https://nodejs.org/download/release/v${nodejs-10_x.version}/node-v${nodejs-10_x.version}-headers.tar.gz";
+    sha256 = "15hkcbs328d3rc1s14rmky8lh8d3rr86l8k0bia0ggxzwl23lj9c";
   };
-  buildslist_yarn = yarn2nix-moretea.mkYarnModules rec {
+  buildslist_yarn = yarn2nix-moretea'.mkYarnModules rec {
     name = "buildslist-yarn-modules";
     pname = name;
     inherit (pythonPackages.buildbot-pkg) version;
@@ -53,7 +57,7 @@ pythonPackages.buildPythonPackage rec {
     (klein.overridePythonAttrs(old: { checkPhase = ""; }))
     buildbot-pkg
   ];
-  nativeBuildInputs = [ fakeYarn nodejs ];
+  nativeBuildInputs = [ fakeYarn nodejs-10_x ];
   buildInputs = [ buildslist_yarn buildslist_bower ];
 
   doCheck = false;
index 6c1444949ca6d69b0f3ca8ba36cdda0ee1a091b3..1232303103c12daef4f8f5b6c42e75e102971a5d 100644 (file)
@@ -1,7 +1,6 @@
-{ stdenv, mylibs, composerEnv, fetchurl, gearmand, callPackage, php73, php73base, config_file ? "/var/lib/status_engine/ui.yml" }:
+{ stdenv, mylibs, composerEnv, fetchurl, gearmand, callPackage, php73, config_file ? "/var/lib/status_engine/ui.yml" }:
 let
-  # FIXME: present in php73.buildPecl in latest nixpkgs-unstable
-  gearman = (callPackage <nixpkgs/pkgs/build-support/build-pecl.nix> { php = php73base; }) rec {
+  gearman = php73.buildPecl rec {
     version = "2.0.6";
     pname = "gearman";
     src = fetchurl {
@@ -13,7 +12,7 @@ let
   };
 in
 (composerEnv.override {
-  php = php73.withExtensions(e: php73.enabledExtensions ++ (with php73.extensions; [gearman redis mbstring bcmath json iconv]));
+  php = php73.withExtensions({ enabled, all }: enabled ++ (with all; [gearman redis mbstring bcmath json iconv]));
 }).buildPackage (mylibs.fetchedGithub ./worker.json //
   import ./worker_php_packages.nix { inherit composerEnv fetchurl; } // rec {
     postInstall = ''
index 29c1981b3ffe243af0aedbd7bdbfe160d1840cdc..22cb2923c8ba451a4d9e90cc6c5d640056d0df55 100644 (file)
@@ -1,4 +1,4 @@
-{ makeWrapper, stdenv, writeScript, fetchurl, buildBowerComponents, mylibs, which, python36, gst_all_1, automake, autoconf, nodejs, nodePackages, lib, callPackage, sources }:
+{ makeWrapper, stdenv, writeScript, fetchurl, buildBowerComponents, mylibs, which, python36, gst_all_1, automake, autoconf, nodejs, nodePackages, lib, callPackage, fetchgit }:
 let
   overridePython = let
     packageOverrides = self: super: {
@@ -38,6 +38,7 @@ let
           inherit (old) pname;
           sha256 = "2dea4d16d073c902c3b89d9b96620fb6729ac0f7a923bbc777cb4ad827c0c61a";
         };
+        doCheck = false;
       });
       kombu = super.kombu.overridePythonAttrs(old: rec {
         version = "3.0.37";
@@ -49,6 +50,14 @@ let
         propagatedBuildInputs = old.propagatedBuildInputs ++ [ self.anyjson ];
         doCheck = false;
       });
+      markdown = super.markdown.overridePythonAttrs(old: rec {
+        version = "3.1.1";
+        src = self.fetchPypi {
+          inherit version;
+          inherit (old) pname;
+          sha256 = "2e50876bcdd74517e7b71f3e7a76102050edec255b3983403f1a63e7c8a41e7a";
+        };
+      });
       sqlalchemy = super.sqlalchemy.overridePythonAttrs(old: rec {
         version = "1.1.18";
         src = self.fetchPypi {
@@ -74,6 +83,14 @@ let
         };
         propagatedBuildInputs = with self; [ six paste PasteDeploy ];
       });
+      werkzeug = super.werkzeug.overridePythonAttrs(old: rec {
+        version = "0.16.1";
+        src = self.fetchPypi {
+          inherit version;
+          inherit (old) pname;
+          sha256 = "b353856d37dec59d6511359f97f6a4b2468442e454bd1c98298ddce53cac1f04";
+        };
+      });
     };
     in
       python36.override { inherit packageOverrides; };
@@ -108,7 +125,13 @@ let
             load_entry_point('mediagoblin', 'console_scripts', 'gmg')()
         )
     '';
-  mediagoblinSrc = sources.webapps-mediagoblin;
+  mediagoblinSrc = fetchgit {
+    name = "mediagoblin";
+    url = "git://git.savannah.gnu.org/mediagoblin.git";
+    rev = "cd465ebfec837a75a44c4ebd727dffe2fff6d850";
+    sha256 = "1yz4i4i97z3rxl534a6psaybyjbyp5nnc52v3nvbpzc4pd2s69mx";
+    fetchSubmodules = true; # important!
+  };
   bowerComponents = buildBowerComponents {
     name = "mediagoblin-bower-components";
     generated = ./bower-packages.nix;
@@ -133,7 +156,7 @@ let
   package = stdenv.mkDerivation rec {
     pname = "mediagoblin";
     name = "${pname}-${version}";
-    version = mediagoblinSrc.version;
+    version = "cd465eb-stable";
     src = mediagoblinSrc;
     preConfigure = ''
       # ./bootstrap.sh
index dd3a4629a537a087525a89e3a39a37dbe3431d81..c38cc156b0a6e9b53acf01047e99b9007d05b1c0 100644 (file)
@@ -3,7 +3,7 @@
 let
   nodeHeaders = fetchurl {
     url = "https://nodejs.org/download/release/v${nodejs.version}/node-v${nodejs.version}-headers.tar.gz";
-    sha256 = "1prvrcvbyal39k9axfwjixs4wfgs1m8xy4prsl0kq0s0n7r7nxzj";
+    sha256 = "12415ss4fxxafp3w8rxp2jbb16y0d7f01b7wv72nmy3cwiqxqkhn";
   };
   source = mylibs.fetchedGithub ./peertube.json;
   patchedSource = stdenv.mkDerivation (source // rec {
@@ -43,12 +43,17 @@ let
     bcrypt = {
       buildInputs = [ nodePackages.node-pre-gyp ];
       postInstall = let
+        node_module_version = "72";
         bcrypt_lib = fetchurl {
-          url = "https://github.com/kelektiv/node.bcrypt.js/releases/download/v3.0.7/bcrypt_lib-v3.0.7-node-v64-linux-x64-glibc.tar.gz";
-          sha256 = "0gbq4grhp5wl0f9yqb4y43kjfh8nivfd6y0nkv1x6gfvs2v23wb0";
+          url = "https://github.com/kelektiv/node.bcrypt.js/releases/download/v3.0.7/bcrypt_lib-v3.0.7-node-v${node_module_version}-linux-x64-glibc.tar.gz";
+          sha256 = "0kpm9j0yc4lqsafldfsql3m72rr1fapljlb6ddxvy3zi13rb7ppx";
         };
       in
         ''
+          if [ "$(node -e "console.log(process.versions.modules)")" != "${node_module_version}" ]; then
+            echo "mismatching version with nodejs please update bcrypt derivation"
+            false
+          fi
           mkdir lib && tar -C lib -xf ${bcrypt_lib}
           patchShebangs ../node-pre-gyp
           npm run install