Skip to content

Commit

Permalink
Merge branch 'master' into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
vcunat committed Jan 22, 2019
2 parents a903c60 + b7d4a35 commit 3fe32b6
Show file tree
Hide file tree
Showing 266 changed files with 5,301 additions and 2,616 deletions.
1 change: 1 addition & 0 deletions doc/functions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@
<xi:include href="functions/fhs-environments.xml" />
<xi:include href="functions/shell.xml" />
<xi:include href="functions/dockertools.xml" />
<xi:include href="functions/prefer-remote-fetch.xml" />
</chapter>
27 changes: 27 additions & 0 deletions doc/functions/prefer-remote-fetch.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<section xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/xinclude"
xml:id="sec-prefer-remote-fetch">
<title>prefer-remote-fetch overlay</title>

<para>
<function>prefer-remote-fetch</function> is an overlay that download sources
on remote builder. This is useful when the evaluating machine has a slow
upload while the builder can fetch faster directly from the source.
To use it, put the following snippet as a new overlay:
<programlisting>
self: super:
(super.prefer-remote-fetch self super)
</programlisting>

A full configuration example for that sets the overlay up for your own account,
could look like this

<programlisting>
$ mkdir ~/.config/nixpkgs/overlays/
$ cat &gt; ~/.config/nixpkgs/overlays/prefer-remote-fetch.nix &lt;&lt;EOF
self: super: super.prefer-remote-fetch self super
EOF
</programlisting>
</para>
</section>
74 changes: 66 additions & 8 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
@@ -1,21 +1,41 @@
/* List of NixOS maintainers.
handle = {
name = "Real name";
# Required
name = "Your name";
email = "[email protected]";
# Optional
github = "GithubUsername";
keys = [{
longkeyid = "rsa2048/0x0123456789ABCDEF";
fingerprint = "AAAA BBBB CCCC DDDD EEEE FFFF 0000 1111 2222 3333";
}];
};
where `name` is your real name, `email` is your maintainer email
address and `github` is your GitHub handle (as it appears in the
URL of your profile page, `https://github.com/<userhandle>`).
address
The only required fields are `name` and `email`.
where
- `handle` is the handle you are going to use in nixpkgs expressions,
- `name` is your, preferably real, name,
- `email` is your maintainer email address, and
- `github` is your GitHub handle (as it appears in the URL of your profile page, `https://github.com/<userhandle>`),
- `keys` is a list of your PGP/GPG key IDs and fingerprints.
`handle == github` is strongly preffered whenever `github` is an acceptable attribute name and is short and convenient.
Add PGP/GPG keys only if you actually use them to sign commits and/or mail.
To get the required PGP/GPG values for a key run
```shell
gpg --keyid-format 0xlong --fingerprint <email> | head -n 2
```
!!! Note that PGP/GPG values stored here are for informational purposes only, don't use this file as a source of truth.
More fields may be added in the future.
Please keep the list alphabetically sorted.
See `../maintainers/scripts/check-maintainer-github-handles.sh`
for an example on how to work with this data.
See `./scripts/check-maintainer-github-handles.sh` for an example on how to work with this data.
*/
{
"1000101" = {
Expand Down Expand Up @@ -341,6 +361,11 @@
github = "apeyroux";
name = "Alexandre Peyroux";
};
ar1a = {
email = "[email protected]";
github = "ar1a";
name = "Aria Edmonds";
};
arcadio = {
email = "[email protected]";
github = "arcadio";
Expand Down Expand Up @@ -1586,6 +1611,11 @@
email = "[email protected]";
name = "Edward O'Callaghan";
};
fusion809 = {
email = "[email protected]";
github = "fusion809";
name = "Brenton Horne";
};
fuuzetsu = {
email = "[email protected]";
github = "fuuzetsu";
Expand Down Expand Up @@ -1919,6 +1949,11 @@
github = "infinisil";
name = "Silvan Mosberger";
};
ingenieroariel = {
email = "[email protected]";
github = "ingenieroariel";
name = "Ariel Nunez";
};
ironpinguin = {
email = "[email protected]";
github = "ironpinguin";
Expand All @@ -1933,6 +1968,15 @@
email = "[email protected]";
name = "Ivan Tkatchev";
};
ivegotasthma = {
email = "[email protected]";
github = "ivegotasthma";
name = "John Doe";
keys = [{
longkeyid = "rsa4096/09AC52AEA87817A4";
fingerprint = "4008 2A5B 56A4 79B9 83CB 95FD 09AC 52AE A878 17A4";
}];
};
ixmatus = {
email = "[email protected]";
github = "ixmatus";
Expand Down Expand Up @@ -3245,6 +3289,11 @@
github = "nyarly";
name = "Judson Lester";
};
nzhang-zh = {
email = "[email protected]";
github = "nzhang-zh";
name = "Ning Zhang";
};
obadz = {
email = "[email protected]";
github = "obadz";
Expand Down Expand Up @@ -3323,6 +3372,10 @@
email = "[email protected]";
github = "oxij";
name = "Jan Malakhovski";
keys = [{
longkeyid = "rsa2048/0x0E6CA66E5C557AA8";
fingerprint = "514B B966 B46E 3565 0508 86E8 0E6C A66E 5C55 7AA8";
}];
};
oyren = {
email = "[email protected]";
Expand Down Expand Up @@ -4316,6 +4369,11 @@
github = "t184256";
name = "Alexander Sosedkin";
};
tadeokondrak = {
email = "[email protected]";
github = "tadeokondrak";
name = "Tadeo Kondrak";
};
tadfisher = {
email = "[email protected]";
github = "tadfisher";
Expand Down
37 changes: 0 additions & 37 deletions nixos/doc/manual/development/debugging-nixos-tests.xml

This file was deleted.

1 change: 0 additions & 1 deletion nixos/doc/manual/development/nixos-tests.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,4 @@ xlink:href="https://github.com/NixOS/nixpkgs/tree/master/nixos/tests">nixos/test
<xi:include href="writing-nixos-tests.xml" />
<xi:include href="running-nixos-tests.xml" />
<xi:include href="running-nixos-tests-interactively.xml" />
<xi:include href="debugging-nixos-tests.xml" />
</chapter>
6 changes: 2 additions & 4 deletions nixos/lib/test-driver/Machine.pm
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,8 @@ sub start {
$ENV{USE_TMPDIR} = 1;
$ENV{QEMU_OPTS} =
($self->{allowReboot} ? "" : "-no-reboot ") .
"-monitor unix:./monitor " .
"-chardev socket,id=shell,path=./shell -device virtio-serial -device virtconsole,chardev=shell " .
# socket backdoor, see "Debugging NixOS tests" section in NixOS manual
"-chardev socket,id=backdoor,path=./backdoor,server,nowait -device virtio-serial -device virtconsole,chardev=backdoor " .
"-monitor unix:./monitor -chardev socket,id=shell,path=./shell " .
"-device virtio-serial -device virtconsole,chardev=shell " .
"-device virtio-rng-pci " .
($showGraphics ? "-serial stdio" : "-nographic") . " " . ($ENV{QEMU_OPTS} || "");
chdir $self->{stateDir} or die;
Expand Down
6 changes: 5 additions & 1 deletion nixos/modules/installer/tools/nixos-generate-config.pl
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,11 @@ sub in {
if (-e $slave) {
my $dmName = read_file("/sys/class/block/$deviceName/dm/name");
chomp $dmName;
$fileSystems .= " boot.initrd.luks.devices.\"$dmName\".device = \"${\(findStableDevPath $slave)}\";\n\n";
# Ensure to add an entry only once
my $luksDevice = " boot.initrd.luks.devices.\"$dmName\".device";
if ($fileSystems !~ /^\Q$luksDevice\E/m) {
$fileSystems .= "$luksDevice = \"${\(findStableDevPath $slave)}\";\n\n";
}
}
}
}
Expand Down
12 changes: 6 additions & 6 deletions nixos/modules/programs/ssh.nix
Original file line number Diff line number Diff line change
Expand Up @@ -167,16 +167,16 @@ in
The set of system-wide known SSH hosts.
'';
example = literalExample ''
[
{
{
myhost = {
hostNames = [ "myhost" "myhost.mydomain.com" "10.10.1.4" ];
publicKeyFile = ./pubkeys/myhost_ssh_host_dsa_key.pub;
}
{
};
myhost2 = {
hostNames = [ "myhost2" ];
publicKeyFile = ./pubkeys/myhost2_ssh_host_dsa_key.pub;
}
]
};
}
'';
};

Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/services/databases/mysql.nix
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ in
${optionalString (cfg.ensureDatabases != []) ''
(
${concatMapStrings (database: ''
echo "CREATE DATABASE IF NOT EXISTS ${database};"
echo "CREATE DATABASE IF NOT EXISTS \`${database}\`;"
'') cfg.ensureDatabases}
) | ${mysql}/bin/mysql -u root -N
''}
Expand Down
3 changes: 2 additions & 1 deletion nixos/modules/services/monitoring/prometheus/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,8 @@ let
promTypes.relabel_config = types.submodule {
options = {
source_labels = mkOption {
type = types.listOf types.str;
type = with types; nullOr (listOf str);
default = null;
description = ''
The source labels select values from existing labels. Their content
is concatenated using the configured separator and matched against
Expand Down
31 changes: 21 additions & 10 deletions nixos/modules/services/web-servers/phpfpm/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,31 @@ let

stateDir = "/run/phpfpm";

poolConfigs = cfg.poolConfigs // mapAttrs mkPool cfg.pools;
poolConfigs =
(mapAttrs mapPoolConfig cfg.poolConfigs) //
(mapAttrs mapPool cfg.pools);

mkPool = n: p: ''
listen = ${p.listen}
${p.extraConfig}
'';
mapPoolConfig = n: p: {
phpPackage = cfg.phpPackage;
config = p;
};

mapPool = n: p: {
phpPackage = p.phpPackage;
config = ''
listen = ${p.listen}
${p.extraConfig}
'';
};

fpmCfgFile = pool: poolConfig: pkgs.writeText "phpfpm-${pool}.conf" ''
fpmCfgFile = pool: conf: pkgs.writeText "phpfpm-${pool}.conf" ''
[global]
error_log = syslog
daemonize = no
${cfg.extraConfig}
[${pool}]
${poolConfig}
${conf}
'';

phpIni = pkgs.runCommand "php.ini" {
Expand Down Expand Up @@ -97,13 +107,14 @@ in {

pools = mkOption {
type = types.attrsOf (types.submodule (import ./pool-options.nix {
inherit lib;
inherit lib config;
}));
default = {};
example = literalExample ''
{
mypool = {
listen = "/path/to/unix/socket";
phpPackage = pkgs.php;
extraConfig = '''
user = nobody
pm = dynamic
Expand Down Expand Up @@ -144,7 +155,7 @@ in {
mkdir -p ${stateDir}
'';
serviceConfig = let
cfgFile = fpmCfgFile pool poolConfig;
cfgFile = fpmCfgFile pool poolConfig.config;
in {
Slice = "phpfpm.slice";
PrivateDevices = true;
Expand All @@ -153,7 +164,7 @@ in {
# XXX: We need AF_NETLINK to make the sendmail SUID binary from postfix work
RestrictAddressFamilies = "AF_UNIX AF_INET AF_INET6 AF_NETLINK";
Type = "notify";
ExecStart = "${cfg.phpPackage}/bin/php-fpm -y ${cfgFile} -c ${phpIni}";
ExecStart = "${poolConfig.phpPackage}/bin/php-fpm -y ${cfgFile} -c ${phpIni}";
ExecReload = "${pkgs.coreutils}/bin/kill -USR2 $MAINPID";
};
}
Expand Down
15 changes: 14 additions & 1 deletion nixos/modules/services/web-servers/phpfpm/pool-options.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
{ lib }:
{ lib, config }:

let
fpmCfg = config.services.phpfpm;
in

with lib; {

Expand All @@ -12,6 +16,15 @@ with lib; {
'';
};

phpPackage = mkOption {
type = types.package;
default = fpmCfg.phpPackage;
defaultText = "config.services.phpfpm.phpPackage";
description = ''
The PHP package to use for running this PHP-FPM pool.
'';
};

extraConfig = mkOption {
type = types.lines;
example = ''
Expand Down
Loading

0 comments on commit 3fe32b6

Please sign in to comment.