Merge branch 'master' into staging

Resolved the following conflicts (by carefully applying patches from the both
branches since the fork point):

   pkgs/development/libraries/epoxy/default.nix
   pkgs/development/libraries/gtk+/3.x.nix
   pkgs/development/python-modules/asgiref/default.nix
   pkgs/development/python-modules/daphne/default.nix
   pkgs/os-specific/linux/systemd/default.nix
This commit is contained in:
Jan Malakhovski
2018-03-10 20:38:13 +00:00
927 changed files with 18154 additions and 12101 deletions
@@ -117,14 +117,7 @@ in
config = {
system.activationScripts.stdio =
''
# Needed by some programs.
ln -sfn /proc/self/fd /dev/fd
ln -sfn /proc/self/fd/0 /dev/stdin
ln -sfn /proc/self/fd/1 /dev/stdout
ln -sfn /proc/self/fd/2 /dev/stderr
'';
system.activationScripts.stdio = ""; # obsolete
system.activationScripts.var =
''
+13 -1
View File
@@ -23,6 +23,8 @@ let
fi
'';
udhcpcArgs = toString cfg.udhcpc.extraArgs;
in
{
@@ -47,6 +49,16 @@ in
'';
};
boot.initrd.network.udhcpc.extraArgs = mkOption {
default = [];
type = types.listOf types.str;
description = ''
Additional command-line arguments passed verbatim to udhcpc if
<option>boot.initrd.network.enable</option> and <option>networking.useDHCP</option>
are enabled.
'';
};
boot.initrd.network.postCommands = mkOption {
default = "";
type = types.lines;
@@ -91,7 +103,7 @@ in
# Acquire a DHCP lease.
echo "acquiring IP address via DHCP..."
udhcpc --quit --now --script ${udhcpcScript} && hasNetwork=1
udhcpc --quit --now --script ${udhcpcScript} ${udhcpcArgs} && hasNetwork=1
fi
''
+21 -2
View File
@@ -5,7 +5,7 @@ with lib;
let
luks = config.boot.initrd.luks;
openCommand = name': { name, device, header, keyFile, keyFileSize, allowDiscards, yubikey, ... }: assert name' == name; ''
openCommand = name': { name, device, header, keyFile, keyFileSize, allowDiscards, yubikey, fallbackToPassword, ... }: assert name' == name; ''
# Wait for a target (e.g. device, keyFile, header, ...) to appear.
wait_target() {
@@ -43,8 +43,17 @@ let
open_normally() {
echo luksOpen ${device} ${name} ${optionalString allowDiscards "--allow-discards"} \
${optionalString (header != null) "--header=${header}"} \
${optionalString (keyFile != null) "--key-file=${keyFile} ${optionalString (keyFileSize != null) "--keyfile-size=${toString keyFileSize}"}"} \
> /.luksopen_args
${optionalString (keyFile != null) ''
${optionalString fallbackToPassword "if [ -e ${keyFile} ]; then"}
echo " --key-file=${keyFile} ${optionalString (keyFileSize != null) "--keyfile-size=${toString keyFileSize}"}" \
>> /.luksopen_args
${optionalString fallbackToPassword ''
else
echo "keyfile ${keyFile} not found -- fallback to interactive unlocking"
fi
''}
''}
cryptsetup-askpass
rm /.luksopen_args
}
@@ -324,6 +333,16 @@ in
'';
};
fallbackToPassword = mkOption {
default = false;
type = types.bool;
description = ''
Whether to fallback to interactive passphrase prompt if the keyfile
cannot be found. This will prevent unattended boot should the keyfile
go missing.
'';
};
yubikey = mkOption {
default = null;
description = ''
+1 -1
View File
@@ -54,7 +54,7 @@ with lib;
environment.systemPackages = [ pkgs.kmod ];
system.activationScripts.modprobe =
system.activationScripts.modprobe = stringAfter ["specialfs"]
''
# Allow the kernel to find our wrapped modprobe (which searches
# in the right location in the Nix store for kernel modules).
+1 -5
View File
@@ -650,11 +650,7 @@ let
unitFiles = map (name: {
target = "systemd/network/${name}";
source = "${cfg.units.${name}.unit}/${name}";
}) (attrNames cfg.units) ++
(map (entry: {
target = "systemd/network/${entry}";
source = "${config.systemd.package}/lib/systemd/network/${entry}";
}) (attrNames (builtins.readDir "${config.systemd.package}/lib/systemd/network")));
}) (attrNames cfg.units);
in
{
@@ -82,7 +82,6 @@ ln -s /proc/mounts /etc/mtab
mkdir -m 01777 -p /tmp
mkdir -m 0755 -p /var/{log,lib,db} /nix/var /etc/nixos/ \
/run/lock /home /bin # for the /bin/sh symlink
install -m 0700 -d /root
# Miscellaneous boot time cleanup.