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 Mar 23, 2017
2 parents f087598 + 632e810 commit c1a9dc3
Show file tree
Hide file tree
Showing 163 changed files with 3,062 additions and 1,902 deletions.
3 changes: 2 additions & 1 deletion .mention-bot
Expand Up @@ -2,7 +2,8 @@
"userBlacklist": [
"civodul",
"jhasse",
"shlevy"
"shlevy",
"bbenoist"
],
"alwaysNotifyForPaths": [
{ "name": "FRidh", "files": ["pkgs/top-level/python-packages.nix", "pkgs/development/interpreters/python/*", "pkgs/development/python-modules/*" ] },
Expand Down
13 changes: 7 additions & 6 deletions doc/languages-frameworks/python.md
Expand Up @@ -3,7 +3,7 @@
## User Guide

Several versions of Python are available on Nix as well as a high amount of
packages. The default interpreter is CPython 3.5.
packages. The default interpreter is CPython 2.7.

### Using Python

Expand Down Expand Up @@ -131,7 +131,7 @@ specify some (optional) [meta information](http://nixos.org/nixpkgs/manual/#chap

The output of the function is a derivation, which is an attribute with the name
`toolz` of the set `pythonPackages`. Actually, sets are created for all interpreter versions,
so `python27Packages`, `python34Packages`, `python35Packages` and `pypyPackages`.
so e.g. `python27Packages`, `python35Packages` and `pypyPackages`.

The above example works when you're directly working on
`pkgs/top-level/python-packages.nix` in the Nixpkgs repository. Often though,
Expand Down Expand Up @@ -422,8 +422,8 @@ and in this case the `python35` interpreter is automatically used.

### Interpreters

Versions 2.6, 2.7, 3.3, 3.4 and 3.5 of the CPython interpreter are available as respectively
`python26`, `python27`, `python33`, `python34` and `python35`. The PyPy interpreter
Versions 2.7, 3.3, 3.4, 3.5 and 3.6 of the CPython interpreter are available as
respectively `python27`, `python33`, `python34`, `python35` and `python36`. The PyPy interpreter
is available as `pypy`. The aliases `python2` and `python3` correspond to respectively `python27` and
`python35`. The default interpreter, `python`, maps to `python2`.
The Nix expressions for the interpreters can be found in
Expand Down Expand Up @@ -472,6 +472,7 @@ sets are
* `pkgs.python33Packages`
* `pkgs.python34Packages`
* `pkgs.python35Packages`
* `pkgs.python36Packages`
* `pkgs.pypyPackages`

and the aliases
Expand Down Expand Up @@ -674,8 +675,8 @@ deterministic bytecode. This has security implications and is relevant for
those using Python in a `nix-shell`.

When the environment variable `DETERMINISTIC_BUILD` is set, all bytecode will have timestamp 1.
The `buildPythonPackage` function sets `DETERMINISTIC_BUILD` as well as
[PYTHONHASHSEED](https://docs.python.org/3.5/using/cmdline.html#envvar-PYTHONHASHSEED).
The `buildPythonPackage` function sets `DETERMINISTIC_BUILD=1` and
[PYTHONHASHSEED=0](https://docs.python.org/3.5/using/cmdline.html#envvar-PYTHONHASHSEED).
Both are also exported in `nix-shell`.


Expand Down
4 changes: 3 additions & 1 deletion lib/maintainers.nix
Expand Up @@ -14,6 +14,7 @@
aboseley = "Adam Boseley <adam.boseley@gmail.com>";
abuibrahim = "Ruslan Babayev <ruslan@babayev.com>";
acowley = "Anthony Cowley <acowley@gmail.com>";
adelbertc = "Adelbert Chang <adelbertc@gmail.com>";
adev = "Adrien Devresse <adev@adev.name>";
Adjective-Object = "Maxwell Huang-Hobbs <mhuan13@gmail.com>";
adnelson = "Allen Nelson <ithinkican@gmail.com>";
Expand Down Expand Up @@ -59,7 +60,6 @@
badi = "Badi' Abdul-Wahid <abdulwahidc@gmail.com>";
balajisivaraman = "Balaji Sivaraman<sivaraman.balaji@gmail.com>";
Baughn = "Svein Ove Aas <sveina@gmail.com>";
bbenoist = "Baptist BENOIST <return_0@live.com>";
bcarrell = "Brandon Carrell <brandoncarrell@gmail.com>";
bcdarwin = "Ben Darwin <bcdarwin@gmail.com>";
bdimcheff = "Brandon Dimcheff <brandon@dimcheff.com>";
Expand Down Expand Up @@ -216,6 +216,7 @@
ivan-tkatchev = "Ivan Tkatchev <tkatchev@gmail.com>";
j-keck = "Jürgen Keck <jhyphenkeck@gmail.com>";
jagajaga = "Arseniy Seroka <ars.seroka@gmail.com>";
jansol = "Jan Solanti <jan.solanti@paivola.fi>";
javaguirre = "Javier Aguirre <contacto@javaguirre.net>";
jb55 = "William Casarin <bill@casarin.me>";
jbedo = "Justin Bedő <cu@cua0.org>";
Expand Down Expand Up @@ -380,6 +381,7 @@
pashev = "Igor Pashev <pashev.igor@gmail.com>";
patternspandemic = "Brad Christensen <patternspandemic@live.com>";
pawelpacana = "Paweł Pacana <pawel.pacana@gmail.com>";
pbogdan = "Piotr Bogdan <ppbogdan@gmail.com>";
periklis = "theopompos@gmail.com";
pesterhazy = "Paulus Esterhazy <pesterhazy@gmail.com>";
peterhoeg = "Peter Hoeg <peter@hoeg.com>";
Expand Down
4 changes: 3 additions & 1 deletion nixos/doc/manual/installation/installing-usb.xml
Expand Up @@ -11,7 +11,9 @@ a USB stick. You can use the <command>dd</command> utility to write the image:
<command>dd if=<replaceable>path-to-image</replaceable>
of=<replaceable>/dev/sdb</replaceable></command>. Be careful about specifying the
correct drive; you can use the <command>lsblk</command> command to get a list of
block devices.</para>
block devices. If you're on OS X you can run <command>diskutil list</command>
to see the list of devices; the device you'll use for the USB must be ejected
before writing the image.</para>

<para>The <command>dd</command> utility will write the image verbatim to the drive,
making it the recommended option for both UEFI and non-UEFI installations. For
Expand Down
16 changes: 7 additions & 9 deletions nixos/doc/manual/release-notes/rl-1703.xml
Expand Up @@ -95,15 +95,6 @@ following incompatible changes:</para>
</para>
</listitem>

<listitem>
<para>
The Yama LSM is now enabled by default in the kernel,
which prevents ptracing non-child processes.
This means you will not be able to attach gdb to an existing process,
but will need to start that process from gdb (so it is a child).
</para>
</listitem>

<listitem>
<para>
The <literal>stripHash</literal> bash function in <literal>stdenv</literal>
Expand Down Expand Up @@ -249,6 +240,13 @@ following incompatible changes:</para>
</para>
</listitem>

<listitem>
<para>
The <literal>fetch*</literal> functions no longer support md5,
please use sha256 instead.
</para>
</listitem>

</itemizedlist>


Expand Down
4 changes: 4 additions & 0 deletions nixos/modules/config/sysctl.nix
Expand Up @@ -64,5 +64,9 @@ in
# Removed under grsecurity.
boot.kernel.sysctl."kernel.kptr_restrict" =
if (config.boot.kernelPackages.kernel.features.grsecurity or false) then null else 1;

# Disable YAMA by default to allow easy debugging.
boot.kernel.sysctl."kernel.yama.ptrace_scope" = mkDefault 0;

};
}
6 changes: 3 additions & 3 deletions nixos/modules/installer/tools/nix-fallback-paths.nix
@@ -1,5 +1,5 @@
{
x86_64-linux = "/nix/store/4ssykr786d0wp7y6m4xd4qwqs4nrry1z-nix-1.11.7";
i686-linux = "/nix/store/61ggxx2072y2g877m01asy0lsn7xpn06-nix-1.11.7";
x86_64-darwin = "/nix/store/pxf5ri5kdbfqkhd10sw4lpj8sn385ks5-nix-1.11.7";
x86_64-linux = "/nix/store/j6q3pb75q1sbk0xsa5x6a629ph98ycdl-nix-1.11.8";
i686-linux = "/nix/store/4m6ps568l988bbr1p2k3w9raq3rblppi-nix-1.11.8";
x86_64-darwin = "/nix/store/cc5q944yn3j2hrs8k0kxx9r2mk9mni8a-nix-1.11.8";
}
2 changes: 2 additions & 0 deletions nixos/modules/rename.nix
Expand Up @@ -200,5 +200,7 @@ with lib;
(mkRemovedOptionModule [ "services" "phpfpm" "phpIni" ] "")
(mkRemovedOptionModule [ "services" "dovecot2" "package" ] "")
(mkRemovedOptionModule [ "fonts" "fontconfig" "hinting" "style" ] "")
(mkRemovedOptionModule [ "services" "xserver" "displayManager" "sddm" "themes" ]
"Set the option `services.xserver.displayManager.sddm.package' instead.")
];
}
19 changes: 0 additions & 19 deletions nixos/modules/security/wrappers/default.nix
Expand Up @@ -177,25 +177,6 @@ in
# programs to be wrapped.
WRAPPER_PATH=${config.system.path}/bin:${config.system.path}/sbin
# Remove the old /var/setuid-wrappers path from the system...
#
# TODO: this is only necessary for ugprades 16.09 => 17.x;
# this conditional removal block needs to be removed after
# the release.
if [ -d /var/setuid-wrappers ]; then
rm -rf /var/setuid-wrappers
fi
# Remove the old /run/setuid-wrappers-dir path from the
# system as well...
#
# TODO: this is only necessary for ugprades 16.09 => 17.x;
# this conditional removal block needs to be removed after
# the release.
if [ -d /run/setuid-wrapper-dirs ]; then
rm -rf /run/setuid-wrapper-dirs
fi
# We want to place the tmpdirs for the wrappers to the parent dir.
wrapperDir=$(mktemp --directory --tmpdir="${parentWrapperDir}" wrappers.XXXXXXXXXX)
chmod a+rx $wrapperDir
Expand Down
6 changes: 4 additions & 2 deletions nixos/modules/services/hardware/udev.nix
Expand Up @@ -35,6 +35,7 @@ let
udevRules = pkgs.runCommand "udev-rules"
{ preferLocalBuild = true;
allowSubstitutes = false;
packages = unique (map toString cfg.packages);
}
''
mkdir -p $out
Expand All @@ -45,7 +46,7 @@ let
echo 'ENV{PATH}="${udevPath}/bin:${udevPath}/sbin"' > $out/00-path.rules
# Add the udev rules from other packages.
for i in ${toString cfg.packages}; do
for i in $packages; do
echo "Adding rules for package $i"
for j in $i/{etc,lib}/udev/rules.d/*; do
echo "Copying $j to $out/$(basename $j)"
Expand Down Expand Up @@ -132,10 +133,11 @@ let
hwdbBin = pkgs.runCommand "hwdb.bin"
{ preferLocalBuild = true;
allowSubstitutes = false;
packages = unique (map toString ([udev] ++ cfg.packages));
}
''
mkdir -p etc/udev/hwdb.d
for i in ${toString ([udev] ++ cfg.packages)}; do
for i in $packages; do
echo "Adding hwdb files for package $i"
for j in $i/{etc,lib}/udev/hwdb.d/*; do
ln -s $j etc/udev/hwdb.d/$(basename $j)
Expand Down
1 change: 1 addition & 0 deletions nixos/modules/services/misc/gitlab.nix
Expand Up @@ -481,6 +481,7 @@ in {
mkdir -p ${cfg.statePath}/repositories
mkdir -p ${gitlabConfig.production.shared.path}/artifacts
mkdir -p ${gitlabConfig.production.shared.path}/lfs-objects
mkdir -p ${gitlabConfig.production.shared.path}/pages
mkdir -p ${cfg.statePath}/log
mkdir -p ${cfg.statePath}/shell
mkdir -p ${cfg.statePath}/tmp/pids
Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/services/misc/nix-daemon.nix
Expand Up @@ -8,7 +8,7 @@ let

nix = cfg.package.out;

isNix112 = versionAtLeast (getVersion nix) "1.12pre4997";
isNix112 = versionAtLeast (getVersion nix) "1.12pre";

makeNixBuildUser = nr:
{ name = "nixbld${toString nr}";
Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/services/misc/octoprint.nix
Expand Up @@ -117,7 +117,7 @@ in
'';

serviceConfig = {
ExecStart = "${pkgs.octoprint}/bin/octoprint -b ${cfg.stateDir}";
ExecStart = "${pkgs.octoprint}/bin/octoprint serve -b ${cfg.stateDir}";
User = cfg.user;
Group = cfg.group;
PermissionsStartOnly = true;
Expand Down
20 changes: 16 additions & 4 deletions nixos/modules/services/monitoring/munin.nix
Expand Up @@ -193,14 +193,26 @@ in

}) (mkIf cronCfg.enable {

services.cron.systemCronJobs = [
"*/5 * * * * munin ${pkgs.munin}/bin/munin-cron --config ${muninConf}"
];
systemd.timers.munin-cron = {
description = "batch Munin master programs";
wantedBy = [ "timers.target" ];
timerConfig.OnCalendar = "*:0/5";
};

systemd.services.munin-cron = {
description = "batch Munin master programs";
unitConfig.Documentation = "man:munin-cron(8)";

serviceConfig = {
Type = "oneshot";
User = "munin";
ExecStart = "${pkgs.munin}/bin/munin-cron --config ${muninConf}";
};
};

system.activationScripts.munin-cron = stringAfter [ "users" "groups" ] ''
mkdir -p /var/{run,log,www,lib}/munin
chown -R munin:munin /var/{run,log,www,lib}/munin
'';

})];
}
1 change: 1 addition & 0 deletions nixos/modules/services/security/tor.nix
Expand Up @@ -140,6 +140,7 @@ in
};

privoxy.enable = mkOption {
type = types.bool;
default = true;
description = ''
Whether to enable and configure the system Privoxy to use Tor's
Expand Down
8 changes: 8 additions & 0 deletions nixos/modules/services/web-servers/nginx/default.nix
Expand Up @@ -185,6 +185,7 @@ let
${optionalString (config.index != null) "index ${config.index};"}
${optionalString (config.tryFiles != null) "try_files ${config.tryFiles};"}
${optionalString (config.root != null) "root ${config.root};"}
${optionalString (config.alias != null) "alias ${config.alias};"}
${config.extraConfig}
}
'') locations);
Expand Down Expand Up @@ -403,6 +404,13 @@ in
config = mkIf cfg.enable {
# TODO: test user supplied config file pases syntax test

assertions = let hostOrAliasIsNull = l: l.root == null || l.alias == null; in [
{
assertion = all (host: all hostOrAliasIsNull (attrValues host.locations)) (attrValues virtualHosts);
message = "Only one of nginx root or alias can be specified on a location.";
}
];

systemd.services.nginx = {
description = "Nginx Web Server";
after = [ "network.target" ];
Expand Down
9 changes: 9 additions & 0 deletions nixos/modules/services/web-servers/nginx/location-options.nix
Expand Up @@ -45,6 +45,15 @@ with lib;
'';
};

alias = mkOption {
type = types.nullOr types.path;
default = null;
example = "/your/alias/directory";
description = ''
Alias directory for requests.
'';
};

extraConfig = mkOption {
type = types.lines;
default = "";
Expand Down
6 changes: 1 addition & 5 deletions nixos/modules/services/x11/desktop-managers/plasma5.nix
Expand Up @@ -208,11 +208,7 @@ in

services.xserver.displayManager.sddm = {
theme = "breeze";
themes = [
pkgs.extra-cmake-modules # for the setup-hook
plasma5.plasma-workspace
pkgs.breeze-icons
];
package = pkgs.sddmPlasma5;
};

security.pam.services.kde = { allowNullPassword = true; };
Expand Down
Expand Up @@ -45,6 +45,7 @@ let
theme-name = ${cfg.theme.name}
icon-theme-name = ${cfg.iconTheme.name}
background = ${ldmcfg.background}
${cfg.extraConfig}
'';

in
Expand Down Expand Up @@ -103,6 +104,15 @@ in

};

extraConfig = mkOption {
type = types.lines;
default = "";
description = ''
Extra configuration that should be put in the lightdm-gtk-greeter.conf
configuration file.
'';
};

};

};
Expand Down
11 changes: 6 additions & 5 deletions nixos/modules/services/x11/display-managers/sddm.nix
Expand Up @@ -9,7 +9,7 @@ let
cfg = dmcfg.sddm;
xEnv = config.systemd.services."display-manager".environment;

sddm = pkgs.sddm.override { inherit (cfg) themes; };
sddm = cfg.package;

xserverWrapper = pkgs.writeScript "xserver-wrapper" ''
#!/bin/sh
Expand Down Expand Up @@ -105,11 +105,12 @@ in
'';
};

themes = mkOption {
type = types.listOf types.package;
default = [];
package = mkOption {
type = types.package;
default = pkgs.sddm;
description = ''
Extra packages providing themes.
The SDDM package to install.
The default package can be overridden to provide extra themes.
'';
};

Expand Down

0 comments on commit c1a9dc3

Please sign in to comment.