diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-03-23 15:35:32 +0100 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-03-23 15:35:32 +0100 |
commit | 2368a4b7e827b985c3758ad0bfe13e4a08d27c36 (patch) | |
tree | b480c3f232ab29fa947e66f4d5b62568c5459f3e /nixops/modules | |
parent | 30a783364abd0afe8399d8f39a251c499451c986 (diff) | |
download | Nix-2368a4b7e827b985c3758ad0bfe13e4a08d27c36.tar.gz Nix-2368a4b7e827b985c3758ad0bfe13e4a08d27c36.tar.zst Nix-2368a4b7e827b985c3758ad0bfe13e4a08d27c36.zip |
Migrate packageOverrides to overlays
Diffstat (limited to 'nixops/modules')
-rw-r--r-- | nixops/modules/databases/mysql.nix | 8 | ||||
-rw-r--r-- | nixops/modules/databases/postgresql.nix | 10 | ||||
-rw-r--r-- | nixops/modules/ftp/default.nix | 6 | ||||
-rw-r--r-- | nixops/modules/gitolite/default.nix | 8 | ||||
-rw-r--r-- | nixops/modules/irc/default.nix | 6 | ||||
-rw-r--r-- | nixops/modules/websites/commons/stats.nix | 10 | ||||
-rw-r--r-- | nixops/modules/websites/default.nix | 12 | ||||
-rw-r--r-- | nixops/modules/websites/tools/git/default.nix | 6 | ||||
-rw-r--r-- | nixops/modules/websites/tools/tools/default.nix | 6 |
9 files changed, 36 insertions, 36 deletions
diff --git a/nixops/modules/databases/mysql.nix b/nixops/modules/databases/mysql.nix index a625d48..635f212 100644 --- a/nixops/modules/databases/mysql.nix +++ b/nixops/modules/databases/mysql.nix | |||
@@ -14,13 +14,13 @@ in { | |||
14 | }; | 14 | }; |
15 | 15 | ||
16 | config = lib.mkIf cfg.enable { | 16 | config = lib.mkIf cfg.enable { |
17 | nixpkgs.config.packageOverrides = oldpkgs: rec { | 17 | nixpkgs.overlays = [ (self: super: rec { |
18 | mariadb = mariadbPAM; | 18 | mariadb = mariadbPAM; |
19 | mariadbPAM = oldpkgs.mariadb.overrideAttrs(old: rec { | 19 | mariadbPAM = super.mariadb.overrideAttrs(old: rec { |
20 | cmakeFlags = old.cmakeFlags ++ [ "-DWITH_AUTHENTICATION_PAM=ON" ]; | 20 | cmakeFlags = old.cmakeFlags ++ [ "-DWITH_AUTHENTICATION_PAM=ON" ]; |
21 | buildInputs = old.buildInputs ++ [ pkgs.pam ]; | 21 | buildInputs = old.buildInputs ++ [ self.pam ]; |
22 | }); | 22 | }); |
23 | }; | 23 | }) ]; |
24 | 24 | ||
25 | networking.firewall.allowedTCPPorts = [ 3306 ]; | 25 | networking.firewall.allowedTCPPorts = [ 3306 ]; |
26 | 26 | ||
diff --git a/nixops/modules/databases/postgresql.nix b/nixops/modules/databases/postgresql.nix index 2e658f8..f839d63 100644 --- a/nixops/modules/databases/postgresql.nix +++ b/nixops/modules/databases/postgresql.nix | |||
@@ -14,22 +14,22 @@ in { | |||
14 | }; | 14 | }; |
15 | 15 | ||
16 | config = lib.mkIf cfg.enable { | 16 | config = lib.mkIf cfg.enable { |
17 | nixpkgs.config.packageOverrides = oldpkgs: rec { | 17 | nixpkgs.overlays = [ (self: super: rec { |
18 | postgresql = postgresql111; | 18 | postgresql = postgresql111; |
19 | postgresql111 = oldpkgs.postgresql100.overrideAttrs(old: rec { | 19 | postgresql111 = super.postgresql100.overrideAttrs(old: rec { |
20 | passthru = old.passthru // { psqlSchema = "11.0"; }; | 20 | passthru = old.passthru // { psqlSchema = "11.0"; }; |
21 | name = "postgresql-11.1"; | 21 | name = "postgresql-11.1"; |
22 | src = pkgs.fetchurl { | 22 | src = self.fetchurl { |
23 | url = "mirror://postgresql/source/v11.1/${name}.tar.bz2"; | 23 | url = "mirror://postgresql/source/v11.1/${name}.tar.bz2"; |
24 | sha256 = "026v0sicsh7avzi45waf8shcbhivyxmi7qgn9fd1x0vl520mx0ch"; | 24 | sha256 = "026v0sicsh7avzi45waf8shcbhivyxmi7qgn9fd1x0vl520mx0ch"; |
25 | }; | 25 | }; |
26 | configureFlags = old.configureFlags ++ [ "--with-pam" ]; | 26 | configureFlags = old.configureFlags ++ [ "--with-pam" ]; |
27 | buildInputs = (old.buildInputs or []) ++ [ pkgs.pam ]; | 27 | buildInputs = (old.buildInputs or []) ++ [ self.pam ]; |
28 | patches = old.patches ++ [ | 28 | patches = old.patches ++ [ |
29 | ./postgresql_run_socket_path.patch | 29 | ./postgresql_run_socket_path.patch |
30 | ]; | 30 | ]; |
31 | }); | 31 | }); |
32 | }; | 32 | }) ]; |
33 | 33 | ||
34 | networking.firewall.allowedTCPPorts = [ 5432 ]; | 34 | networking.firewall.allowedTCPPorts = [ 5432 ]; |
35 | 35 | ||
diff --git a/nixops/modules/ftp/default.nix b/nixops/modules/ftp/default.nix index 7f3fd62..af9a75c 100644 --- a/nixops/modules/ftp/default.nix +++ b/nixops/modules/ftp/default.nix | |||
@@ -19,9 +19,9 @@ | |||
19 | extraDomains = { "ftp.immae.eu" = null; }; | 19 | extraDomains = { "ftp.immae.eu" = null; }; |
20 | }; | 20 | }; |
21 | 21 | ||
22 | nixpkgs.config.packageOverrides = oldpkgs: rec { | 22 | nixpkgs.overlays = [ (self: super: { |
23 | pure-ftpd = pkgs.callPackage ./pure-ftpd.nix {}; | 23 | pure-ftpd = self.callPackage ./pure-ftpd.nix {}; |
24 | }; | 24 | }) ]; |
25 | 25 | ||
26 | networking = { | 26 | networking = { |
27 | firewall = { | 27 | firewall = { |
diff --git a/nixops/modules/gitolite/default.nix b/nixops/modules/gitolite/default.nix index 21eabc4..44442ea 100644 --- a/nixops/modules/gitolite/default.nix +++ b/nixops/modules/gitolite/default.nix | |||
@@ -11,18 +11,18 @@ in { | |||
11 | }; | 11 | }; |
12 | 12 | ||
13 | config = lib.mkIf cfg.enable { | 13 | config = lib.mkIf cfg.enable { |
14 | nixpkgs.config.packageOverrides = oldpkgs: rec { | 14 | nixpkgs.overlays = [ (self: super: rec { |
15 | gitolite = oldpkgs.gitolite.overrideAttrs(old: rec { | 15 | gitolite = super.gitolite.overrideAttrs(old: rec { |
16 | name = "gitolite-${version}"; | 16 | name = "gitolite-${version}"; |
17 | version = "3.6.10"; | 17 | version = "3.6.10"; |
18 | src = pkgs.fetchFromGitHub { | 18 | src = self.fetchFromGitHub { |
19 | owner = "sitaramc"; | 19 | owner = "sitaramc"; |
20 | repo = "gitolite"; | 20 | repo = "gitolite"; |
21 | rev = "v${version}"; | 21 | rev = "v${version}"; |
22 | sha256 = "0p2697mn6rwm03ndlv7q137zczai82n41aplq1g006ii7f12xy8h"; | 22 | sha256 = "0p2697mn6rwm03ndlv7q137zczai82n41aplq1g006ii7f12xy8h"; |
23 | }; | 23 | }; |
24 | }); | 24 | }); |
25 | }; | 25 | }) ]; |
26 | 26 | ||
27 | networking.firewall.allowedTCPPorts = [ 9418 ]; | 27 | networking.firewall.allowedTCPPorts = [ 9418 ]; |
28 | 28 | ||
diff --git a/nixops/modules/irc/default.nix b/nixops/modules/irc/default.nix index a7e45ba..37cb53b 100644 --- a/nixops/modules/irc/default.nix +++ b/nixops/modules/irc/default.nix | |||
@@ -69,11 +69,11 @@ in | |||
69 | ''; | 69 | ''; |
70 | }; | 70 | }; |
71 | 71 | ||
72 | nixpkgs.config.packageOverrides = oldpkgs: rec { | 72 | nixpkgs.overlays = [ (self: super: rec { |
73 | bitlbee = oldpkgs.bitlbee.overrideAttrs(old: { | 73 | bitlbee = super.bitlbee.overrideAttrs(old: { |
74 | patches = (old.patches or []) ++ [ ./bitlbee_long_nicks.patch ]; | 74 | patches = (old.patches or []) ++ [ ./bitlbee_long_nicks.patch ]; |
75 | }); | 75 | }); |
76 | }; | 76 | }) ]; |
77 | 77 | ||
78 | networking.firewall.allowedTCPPorts = [ 6697 ]; | 78 | networking.firewall.allowedTCPPorts = [ 6697 ]; |
79 | services.bitlbee = { | 79 | services.bitlbee = { |
diff --git a/nixops/modules/websites/commons/stats.nix b/nixops/modules/websites/commons/stats.nix index e2c1e62..921cde2 100644 --- a/nixops/modules/websites/commons/stats.nix +++ b/nixops/modules/websites/commons/stats.nix | |||
@@ -23,18 +23,18 @@ in { | |||
23 | pkgs.goaccess | 23 | pkgs.goaccess |
24 | ]; | 24 | ]; |
25 | 25 | ||
26 | nixpkgs.config.packageOverrides = oldpkgs: rec { | 26 | nixpkgs.overlays = [ (self: super: rec { |
27 | goaccess = oldpkgs.goaccess.overrideAttrs(old: rec { | 27 | goaccess = super.goaccess.overrideAttrs(old: rec { |
28 | name = "goaccess-${version}"; | 28 | name = "goaccess-${version}"; |
29 | version = "1.3"; | 29 | version = "1.3"; |
30 | src = pkgs.fetchurl { | 30 | src = self.fetchurl { |
31 | url = "https://tar.goaccess.io/${name}.tar.gz"; | 31 | url = "https://tar.goaccess.io/${name}.tar.gz"; |
32 | sha256 = "16vv3pj7pbraq173wlxa89jjsd279004j4kgzlrsk1dz4if5qxwc"; | 32 | sha256 = "16vv3pj7pbraq173wlxa89jjsd279004j4kgzlrsk1dz4if5qxwc"; |
33 | }; | 33 | }; |
34 | configureFlags = old.configureFlags ++ [ "--enable-tcb=btree" ]; | 34 | configureFlags = old.configureFlags ++ [ "--enable-tcb=btree" ]; |
35 | buildInputs = old.buildInputs ++ [ pkgs.tokyocabinet pkgs.bzip2 ]; | 35 | buildInputs = old.buildInputs ++ [ self.tokyocabinet self.bzip2 ]; |
36 | }); | 36 | }); |
37 | }; | 37 | }) ]; |
38 | 38 | ||
39 | services.cron = { | 39 | services.cron = { |
40 | enable = true; | 40 | enable = true; |
diff --git a/nixops/modules/websites/default.nix b/nixops/modules/websites/default.nix index c8f7481..14f2116 100644 --- a/nixops/modules/websites/default.nix +++ b/nixops/modules/websites/default.nix | |||
@@ -179,10 +179,10 @@ in | |||
179 | ]; | 179 | ]; |
180 | }; | 180 | }; |
181 | 181 | ||
182 | nixpkgs.config.packageOverrides = oldpkgs: rec { | 182 | nixpkgs.overlays = [ (self: super: rec { |
183 | php = php72; | 183 | php = php72; |
184 | php72 = (oldpkgs.php72.override { | 184 | php72 = (super.php72.override { |
185 | mysql.connector-c = pkgs.mariadb; | 185 | mysql.connector-c = self.mariadb; |
186 | config.php.mysqlnd = false; | 186 | config.php.mysqlnd = false; |
187 | config.php.mysqli = false; | 187 | config.php.mysqli = false; |
188 | }).overrideAttrs(old: rec { | 188 | }).overrideAttrs(old: rec { |
@@ -196,11 +196,11 @@ in | |||
196 | # ext/mysqli/mysqli.c ext/mysqli/mysqli_prop.c | 196 | # ext/mysqli/mysqli.c ext/mysqli/mysqli_prop.c |
197 | # ''; | 197 | # ''; |
198 | }); | 198 | }); |
199 | phpPackages = oldpkgs.php72Packages.override { inherit php; }; | 199 | phpPackages = super.php72Packages.override { inherit php; }; |
200 | composerEnv = import ./commons/composer-env.nix { | 200 | composerEnv = import ./commons/composer-env.nix { |
201 | inherit (pkgs) stdenv writeTextFile fetchurl php unzip; | 201 | inherit (self) stdenv writeTextFile fetchurl php unzip; |
202 | }; | 202 | }; |
203 | }; | 203 | }) ]; |
204 | 204 | ||
205 | services.myWebsites.tools.databases.enable = true; | 205 | services.myWebsites.tools.databases.enable = true; |
206 | services.myWebsites.tools.tools.enable = true; | 206 | services.myWebsites.tools.tools.enable = true; |
diff --git a/nixops/modules/websites/tools/git/default.nix b/nixops/modules/websites/tools/git/default.nix index 2aa86cd..11b0245 100644 --- a/nixops/modules/websites/tools/git/default.nix +++ b/nixops/modules/websites/tools/git/default.nix | |||
@@ -15,13 +15,13 @@ in { | |||
15 | config = lib.mkIf cfg.enable { | 15 | config = lib.mkIf cfg.enable { |
16 | security.acme.certs."eldiron".extraDomains."git.immae.eu" = null; | 16 | security.acme.certs."eldiron".extraDomains."git.immae.eu" = null; |
17 | 17 | ||
18 | nixpkgs.config.packageOverrides = oldpkgs: rec { | 18 | nixpkgs.overlays = [ (self: super: rec { |
19 | gitweb = oldpkgs.gitweb.overrideAttrs(old: { | 19 | gitweb = super.gitweb.overrideAttrs(old: { |
20 | installPhase = old.installPhase + '' | 20 | installPhase = old.installPhase + '' |
21 | cp -r ${./gitweb/theme} $out/gitweb-theme; | 21 | cp -r ${./gitweb/theme} $out/gitweb-theme; |
22 | ''; | 22 | ''; |
23 | }); | 23 | }); |
24 | }; | 24 | }) ]; |
25 | 25 | ||
26 | services.myWebsites.tools.modules = | 26 | services.myWebsites.tools.modules = |
27 | gitweb.apache.modules ++ | 27 | gitweb.apache.modules ++ |
diff --git a/nixops/modules/websites/tools/tools/default.nix b/nixops/modules/websites/tools/tools/default.nix index e0181c4..3b49077 100644 --- a/nixops/modules/websites/tools/tools/default.nix +++ b/nixops/modules/websites/tools/tools/default.nix | |||
@@ -156,9 +156,9 @@ in { | |||
156 | ln -s ${yourls.webRoot} $out/webapps/${yourls.apache.webappName} | 156 | ln -s ${yourls.webRoot} $out/webapps/${yourls.apache.webappName} |
157 | ''; | 157 | ''; |
158 | 158 | ||
159 | nixpkgs.config.packageOverrides = oldpkgs: rec { | 159 | nixpkgs.overlays = [ (self: super: rec { |
160 | ympd = oldpkgs.ympd.overrideAttrs(old: mylibs.fetchedGithub ./ympd.json); | 160 | ympd = super.ympd.overrideAttrs(old: mylibs.fetchedGithub ./ympd.json); |
161 | }; | 161 | }) ]; |
162 | 162 | ||
163 | systemd.services.tt-rss = { | 163 | systemd.services.tt-rss = { |
164 | description = "Tiny Tiny RSS feeds update daemon"; | 164 | description = "Tiny Tiny RSS feeds update daemon"; |