Skip to content

Commit

Permalink
Merge commit 'refs/top-bases/experimental/mingw' into experimental/mingw
Browse files Browse the repository at this point in the history
* commit 'refs/top-bases/experimental/mingw': (206 commits)
  nixos/peerflix: add test to release.nix
  nixos: add peerflix module
  rescuetime: add version
  rescuetime: fix typo
  linux: 3.18.0-rc6 -> 3.18.0-rc7
  nixos/networking: Fix more harmless errors
  rescuetime: a time tracking service
  virtualbox: Fix extension pack installation.
  nodePackages: hack version override sed some more to support github packages, until better solution is found
  rubyLibs: add tmuxinator, update
  deluge: 1.3.7 -> 1.3.10
  munin: 2.0.21 -> 2.0.25
  setuptools: 5.8 -> 7.0
  afl: 0.68b -> 0.79b
  i3: make i3-save-workspace work
  virtualbox: Allow /nix/store being world-writable.
  zeromq: 4.0.4 -> 4.0.5
  nixos/tests: add networking-proxy.nix to release
  Improve readability - from NixOS#5058 (comment)
  Ensure nix-daemon sees the proxy defined options
  ...
  • Loading branch information
MarcWeber committed Dec 1, 2014
2 parents 02451ce + 7825adc commit 7ee2918
Show file tree
Hide file tree
Showing 234 changed files with 9,982 additions and 4,655 deletions.
2 changes: 2 additions & 0 deletions lib/maintainers.nix
Expand Up @@ -108,6 +108,7 @@
mornfall = "Petr Ročkai <me@mornfall.net>";
MP2E = "Cray Elliott <MP2E@archlinux.us>";
msackman = "Matthew Sackman <matthew@wellquite.org>";
muflax = "Stefan Dorn <mail@muflax.com>";
nathan-gs = "Nathan Bijnens <nathan@nathan.gs>";
nckx = "Tobias Geerinckx-Rice <tobias.geerinckx.rice@gmail.com>";
notthemessiah = "Brian Cohen <brian.cohen.88@gmail.com>";
Expand Down Expand Up @@ -147,6 +148,7 @@
skeidel = "Sven Keidel <svenkeidel@gmail.com>";
smironov = "Sergey Mironov <ierton@gmail.com>";
sprock = "Roger Mason <rmason@mun.ca>";
spwhitt = "Spencer Whitt <sw@swhitt.me>";
sztupi = "Attila Sztupak <attila.sztupak@gmail.com>";
tailhook = "Paul Colomiets <paul@colomiets.name>";
thammers = "Tobias Hammerschmidt <jawr@gmx.de>";
Expand Down
2 changes: 1 addition & 1 deletion nixos/doc/manual/configuration/network-manager.xml
Expand Up @@ -13,7 +13,7 @@ use NetworkManager. You can enable NetworkManager by setting:
services.networkmanager.enable = true;
</programlisting>

Some desktop managers (e.g., GNOME) enable NetworkManager
some desktop managers (e.g., GNOME) enable NetworkManager
automatically for you.</para>

<para>All users that should have permission to change network settings
Expand Down
32 changes: 17 additions & 15 deletions nixos/doc/manual/development/running-nixos-tests.xml
Expand Up @@ -39,24 +39,13 @@ $ firefox result/log.html

</para>

<para>It is also possible to run the test environment interactively,
allowing you to experiment with the VMs. For example:
<title>Running Tests interactively</title>

<screen>
$ nix-build login.nix -A driver
$ ./result/bin/nixos-run-vms
</screen>

The script <command>nixos-run-vms</command> starts the virtual
machines defined by test. The root file system of the VMs is created
on the fly and kept across VM restarts in
<filename>./</filename><varname>hostname</varname><filename>.qcow2</filename>.</para>

<para>Finally, the test itself can be run interactively. This is
<para>The test itself can be run interactively. This is
particularly useful when developing or debugging a test:

<screen>
$ nix-build tests/ -A nfs.driver
$ nix-build nixos/tests/login.nix -A driver
$ ./result/bin/nixos-test-driver
starting VDE switch for network 1
&gt;
Expand All @@ -66,6 +55,7 @@ You can then take any Perl statement, e.g.

<screen>
&gt; startAll
&gt; testScript
&gt; $machine->succeed("touch /tmp/foo")
</screen>

Expand All @@ -74,4 +64,16 @@ script and drops you back into the test driver command line upon its
completion. This allows you to inspect the state of the VMs after the
test (e.g. to debug the test script).</para>

</section>
<para>To just start and experiment with the VMs, run:

<screen>
$ nix-build nixos/tests/login.nix -A driver
$ ./result/bin/nixos-run-vms
</screen>

The script <command>nixos-run-vms</command> starts the virtual
machines defined by test. The root file system of the VMs is created
on the fly and kept across VM restarts in
<filename>./</filename><varname>hostname</varname><filename>.qcow2</filename>.</para>

</section>
6 changes: 3 additions & 3 deletions nixos/doc/manual/installation/installing.xml
Expand Up @@ -25,14 +25,14 @@
run <command>start display-manager</command> to start KDE.</para></listitem>

<listitem><para>The boot process should have brought up networking (check
<command>ifconfig</command>). Networking is necessary for the
<command>ip a</command>). Networking is necessary for the
installer, since it will download lots of stuff (such as source
tarballs or Nixpkgs channel binaries). It’s best if you have a DHCP
server on your network. Otherwise configure networking manually
using <command>ifconfig</command>.</para>
<para>To manually configure the network on the graphical installer,
first disable NetworkManager with
<command>stop NetworkManager</command>.</para></listitem>
first disable network-manager with
<command>systemctl stop network-manager</command>.</para></listitem>

<listitem><para>The NixOS installer doesn’t do any partitioning or
formatting yet, so you need to that yourself. Use the following
Expand Down
117 changes: 115 additions & 2 deletions nixos/modules/config/networking.nix
Expand Up @@ -39,6 +39,73 @@ in
'';
};

networking.proxy = {

default = lib.mkOption {
type = types.nullOr types.str;
default = null;
description = ''
This option specifies the default value for httpProxy, httpsProxy, ftpProxy and rsyncProxy.
'';
example = "http://127.0.0.1:3128";
};

httpProxy = lib.mkOption {
type = types.nullOr types.str;
default = cfg.proxy.default;
description = ''
This option specifies the http_proxy environment variable.
'';
example = "http://127.0.0.1:3128";
};

httpsProxy = lib.mkOption {
type = types.nullOr types.str;
default = cfg.proxy.default;
description = ''
This option specifies the https_proxy environment variable.
'';
example = "http://127.0.0.1:3128";
};

ftpProxy = lib.mkOption {
type = types.nullOr types.str;
default = cfg.proxy.default;
description = ''
This option specifies the ftp_proxy environment variable.
'';
example = "http://127.0.0.1:3128";
};

rsyncProxy = lib.mkOption {
type = types.nullOr types.str;
default = cfg.proxy.default;
description = ''
This option specifies the rsync_proxy environment variable.
'';
example = "http://127.0.0.1:3128";
};

noProxy = lib.mkOption {
type = types.nullOr types.str;
default = null;
description = ''
This option specifies the no_proxy environment variable.
If a default proxy is used and noProxy is null,
then noProxy will be set to 127.0.0.1,localhost.
'';
example = "127.0.0.1,localhost,.localdomain";
};

envVars = lib.mkOption {
type = types.attrs;
internal = true;
default = {};
description = ''
Environment variables used for the network proxy.
'';
};
};
};

config = {
Expand Down Expand Up @@ -84,13 +151,59 @@ in
dnsmasq_conf=/etc/dnsmasq-conf.conf
dnsmasq_resolv=/etc/dnsmasq-resolv.conf
'';
};

} // (optionalAttrs config.services.resolved.enable (
if dnsmasqResolve then {
"dnsmasq-resolv.conf".source = "/run/systemd/resolve/resolv.conf";
} else {
"resolv.conf".source = "/run/systemd/resolve/resolv.conf";
}
));

networking.proxy.envVars =
optionalAttrs (cfg.proxy.default != null) {
# other options already fallback to proxy.default
no_proxy = "127.0.0.1,localhost";
} // optionalAttrs (cfg.proxy.httpProxy != null) {
http_proxy = cfg.proxy.httpProxy;
} // optionalAttrs (cfg.proxy.httpsProxy != null) {
https_proxy = cfg.proxy.httpsProxy;
} // optionalAttrs (cfg.proxy.rsyncProxy != null) {
rsync_proxy = cfg.proxy.rsyncProxy;
} // optionalAttrs (cfg.proxy.ftpProxy != null) {
ftp_proxy = cfg.proxy.ftpProxy;
} // optionalAttrs (cfg.proxy.noProxy != null) {
no_proxy = cfg.proxy.noProxy;
};

# Install the proxy environment variables
environment.sessionVariables = cfg.proxy.envVars;

# The ‘ip-up’ target is started when we have IP connectivity. So
# services that depend on IP connectivity (like ntpd) should be
# pulled in by this target.
systemd.targets.ip-up.description = "Services Requiring IP Connectivity";

# This is needed when /etc/resolv.conf is being overriden by networkd
# and other configurations. If the file is destroyed by an environment
# activation then it must be rebuilt so that applications which interface
# with /etc/resolv.conf directly don't break.
system.activationScripts.resolvconf = stringAfter [ "etc" "tmpfs" "var" ]
''
# Systemd resolved controls its own resolv.conf
rm -f /run/resolvconf/interfaces/systemd
${optionalString config.services.resolved.enable ''
rm -rf /run/resolvconf/interfaces
mkdir -p /run/resolvconf/interfaces
ln -s /run/systemd/resolve/resolv.conf /run/resolvconf/interfaces/systemd
''}
# Make sure resolv.conf is up to date if not managed by systemd
${optionalString (!config.services.resolved.enable) ''
${pkgs.openresolv}/bin/resolvconf -u
''}
'';

};

}
}
2 changes: 1 addition & 1 deletion nixos/modules/hardware/video/bumblebee.nix
Expand Up @@ -30,7 +30,7 @@ with lib;
boot.kernelModules = [ "bbswitch" ];
boot.extraModulePackages = [ kernel.bbswitch kernel.nvidia_x11 ];

environment.systemPackages = [ pkgs.bumblebee ];
environment.systemPackages = [ pkgs.bumblebee pkgs.primus ];

systemd.services.bumblebeed = {
description = "Bumblebee Hybrid Graphics Switcher";
Expand Down
5 changes: 4 additions & 1 deletion nixos/modules/hardware/video/nvidia.nix
Expand Up @@ -11,7 +11,8 @@ let
# FIXME: should introduce an option like
# ‘hardware.video.nvidia.package’ for overriding the default NVIDIA
# driver.
enabled = elem "nvidia" drivers || elem "nvidiaLegacy173" drivers || elem "nvidiaLegacy304" drivers;
enabled = elem "nvidia" drivers || elem "nvidiaLegacy173" drivers
|| elem "nvidiaLegacy304" drivers || elem "nvidiaLegacy340" drivers;

nvidia_x11 =
if elem "nvidia" drivers then
Expand All @@ -20,6 +21,8 @@ let
config.boot.kernelPackages.nvidia_x11_legacy173
else if elem "nvidiaLegacy304" drivers then
config.boot.kernelPackages.nvidia_x11_legacy304
else if elem "nvidiaLegacy340" drivers then
config.boot.kernelPackages.nvidia_x11_legacy340
else throw "impossible";

in
Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/installer/tools/nixos-generate-config.pl
Expand Up @@ -235,7 +235,7 @@ sub usbCheck {
# Check if we're a VirtualBox guest. If so, enable the guest
# additions.
if ($virt eq "oracle") {
push @attrs, "services.virtualbox.enable = true;"
push @attrs, "services.virtualboxGuest.enable = true;"
}


Expand Down
3 changes: 3 additions & 0 deletions nixos/modules/misc/ids.nix
Expand Up @@ -169,6 +169,8 @@
opentsdb = 159;
scollector = 160;
bosun = 161;
kubernetes = 162;
peerflix = 163;

# When adding a uid, make sure it doesn't match an existing gid. And don't use uids above 399!

Expand Down Expand Up @@ -302,6 +304,7 @@
liquidsoap = 155;
scollector = 156;
bosun = 157;
kubernetes = 158;

# When adding a gid, make sure it doesn't match an existing uid. And don't use gids above 399!

Expand Down
6 changes: 6 additions & 0 deletions nixos/modules/module-list.nix
Expand Up @@ -67,6 +67,7 @@
./programs/ssmtp.nix
./programs/uim.nix
./programs/venus.nix
./programs/virtualbox-host.nix
./programs/wvdial.nix
./programs/freetds.nix
./programs/zsh/zsh.nix
Expand Down Expand Up @@ -274,6 +275,7 @@
./services/networking/spiped.nix
./services/networking/ssh/lshd.nix
./services/networking/ssh/sshd.nix
./services/networking/strongswan.nix
./services/networking/supybot.nix
./services/networking/syncthing.nix
./services/networking/tcpcrypt.nix
Expand Down Expand Up @@ -307,6 +309,7 @@
./services/system/nscd.nix
./services/system/uptimed.nix
./services/torrent/deluge.nix
./services/torrent/peerflix.nix
./services/torrent/transmission.nix
./services/ttys/agetty.nix
./services/ttys/gpm.nix
Expand Down Expand Up @@ -386,13 +389,16 @@
./tasks/kbd.nix
./tasks/lvm.nix
./tasks/network-interfaces.nix
./tasks/network-interfaces-systemd.nix
./tasks/network-interfaces-scripted.nix
./tasks/scsi-link-power-management.nix
./tasks/swraid.nix
./tasks/trackpoint.nix
./testing/service-runner.nix
./virtualisation/container-config.nix
./virtualisation/containers.nix
./virtualisation/docker.nix
./virtualisation/kubernetes.nix
./virtualisation/libvirtd.nix
./virtualisation/lxc.nix
#./virtualisation/nova.nix
Expand Down
1 change: 0 additions & 1 deletion nixos/modules/programs/environment.nix
Expand Up @@ -40,7 +40,6 @@ in
# TODO: move most of these elsewhere
environment.profileRelativeEnvVars =
{ PATH = [ "/bin" "/sbin" "/lib/kde4/libexec" ];
MANPATH = [ "/man" "/share/man" ];
INFOPATH = [ "/info" "/share/info" ];
PKG_CONFIG_PATH = [ "/lib/pkgconfig" ];
TERMINFO_DIRS = [ "/share/terminfo" ];
Expand Down

0 comments on commit 7ee2918

Please sign in to comment.