Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 58eac16818e8
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 06cdd3665912
Choose a head ref

Commits on Sep 29, 2019

  1. phpPackages.phpcs: 3.4.2 -> 3.5.0

    (cherry picked from commit 5e4de79)
    Ma27 authored and etu committed Sep 29, 2019
    Copy the full SHA
    0f663ef View commit details
  2. pythonPackages.streamz: 0.5.1 -> 0.5.2

    (cherry picked from commit 8d306d5)
    Jonathan Ringer authored and marsam committed Sep 29, 2019
    Copy the full SHA
    fb2ea4f View commit details
  3. nixos/tests/ferm: wait for DAD timeout before testing

    The test has recently been failing due to the IPv6 address
    on the server still being in the tentative state, when the
    client sends its first request. The server will not start
    using the IPv6 address until DAD has completed.
    
    Scripted networking seems not to wait for DAD completion
    before completing network-online.target, so let's switch
    to networkd instead, which does.
    
    (cherry picked from commit 1fb3818)
    mweinelt authored and Mic92 committed Sep 29, 2019
    Copy the full SHA
    83665e3 View commit details
  4. pythonPackages.supervisor: 3.3.5 -> 4.0.4

    (cherry picked from commit f08d4f7)
    Jonathan Ringer authored and Mic92 committed Sep 29, 2019
    Copy the full SHA
    e1b962d View commit details
  5. pythonPackages.shodan: 1.14.0 -> 1.17.0

    (cherry picked from commit fb41b3d)
    Jonathan Ringer authored and Mic92 committed Sep 29, 2019
    Copy the full SHA
    21a8839 View commit details
  6. pythonPackages.xapian: disable smoketests

    (cherry picked from commit 24b364e)
    Jonathan Ringer authored and Ma27 committed Sep 29, 2019
    Copy the full SHA
    8873046 View commit details
  7. Merge pull request #70003 from etu/1909-php-cs

    [19.09] phpPackages.phpcs: 3.4.2 -> 3.5.0
    Ma27 authored Sep 29, 2019
    Copy the full SHA
    7a3083f View commit details

Commits on Sep 30, 2019

  1. phpPackages.phpcbf: 3.4.2 -> 3.5.0

    (cherry picked from commit 096f03e)
    Ma27 authored and etu committed Sep 30, 2019
    Copy the full SHA
    b1967e3 View commit details
  2. Merge pull request #70048 from etu/1909-phpcbf

    [19.09] phpPackages.phpcbf: 3.4.2 -> 3.5.0
    Ma27 authored Sep 30, 2019
    Copy the full SHA
    105189c View commit details
  3. nixos/systemd: pick more upstream tmpfiles confs

    In #68792 it was discovered that /dev/fuse doesn't have
    wordl-read-writeable permissions anymore. The cause of this is that the
    tmpfiles examples in systemd were reorganized and split into more files.
    We thus lost some of the configuration we were depending on.
    
    In this commit some of the new tmpfiles configuration that are
    applicable to us are added which also makes wtmp/lastlog in the pam
    module not necessary anymore.
    
    Rationale for the new tmpfile configs:
    
      - `journal-nowcow.conf`: Contains chattr +C for journald logs which
      makes sense on copy-on-write filesystems like Btrfs. Other filesystems
      shouldn't do anything funny when that flag is set.
    
      - `static-nodes-permissions.conf`: Contains some permission overrides
      for some device nodes like audio, loop, tun, fuse and kvm.
    
      - `systemd-nspawn.conf`: Makes sure `/var/lib/machines` exists and old
      snapshots are properly removed.
    
      - `systemd-tmp.conf`: Removes systemd services related private tmp
      folders and temporary coredump files.
    
      - `var.conf`: Creates some useful directories in `/var` which we would
      create anyway at some point. Also includes
      `/var/log/{wtmp,btmp,lastlog}`.
    
    Fixes #68792.
    
    (cherry picked from commit 0dc4fe0)
    fpletz authored and lheckemann committed Sep 30, 2019
    Copy the full SHA
    ad36169 View commit details
  4. Merge branch 'staging-19.09' into release-19.09

    Almost all is rebuilt now, no mass regressions in there:
    https://hydra.nixos.org/eval/1545643
    vcunat committed Sep 30, 2019
    Copy the full SHA
    89509ca View commit details
  5. mkRemovedOptionModule: assert on removed options

    We don't want to ignore config that can mess up machines. In general
    this should always fail evaluation, as you think you are changing
    behaviour and don't, which can easily create run-time errors we can
    catch early.
    
    (cherry picked from commit b08b0bc)
    globin authored and lheckemann committed Sep 30, 2019
    Copy the full SHA
    00f495f View commit details
  6. Copy the full SHA
    44f8f39 View commit details
  7. roundcube: 1.3.9 -> 1.3.10

    Semi-automatic update generated by
    https://github.com/ryantm/nixpkgs-update tools. This update was made
    based on information from
    https://repology.org/metapackage/roundcube/versions
    
    (cherry picked from commit ad16672)
    r-ryantm authored and globin committed Sep 30, 2019
    Copy the full SHA
    6bce1ac View commit details

Commits on Oct 1, 2019

  1. Merge pull request #70065 from worldofpeace/libproxy-19.09/fixbuild

    [19.09] libproxy: build with spidermonkey_60
    worldofpeace authored Oct 1, 2019
    Copy the full SHA
    2ed7dfe View commit details
  2. quassel: Fix use of mkDerivation

    The `with stdenv;` would override the `mkDerivation` to be the regular
    one, instead of the libsForQt5 one.
    
    This simply removes the dangerous use of the all-encompassing `with`,
    and prefers using a more precise inherit for `lib`.
    
    See #65399
    
    Co-authored-by: worldofpeace <worldofpeace@protonmail.ch>
    (cherry picked from commit c52b5b8)
    samueldr authored and worldofpeace committed Oct 1, 2019
    Copy the full SHA
    0fc13aa View commit details
  3. blueman: no optional networkmanager

    blueman declares NetworkManager gi bindings
    as a required runtime dependency [0]
    
    Fixes #69555
    
    [0]: https://github.com/blueman-project/blueman/blob/531da47b06de3617492cc5ae5530ca8b3f2e12a4/Dependencies.md
    
    (cherry picked from commit fcb84c5)
    worldofpeace committed Oct 1, 2019
    Copy the full SHA
    aaa1739 View commit details
  4. epson-escpr2: 1.0.29 -> 1.1.1

    The build was failing because the source rpm does not exist
    on epsons servers anymore.
    
    Thus bumping it to an existing version
    https://hydra.nixos.org/build/101990975/nixlog/5
    
    (cherry picked from commit e338105)
    d-goldin authored and worldofpeace committed Oct 1, 2019
    Copy the full SHA
    8ef6192 View commit details
  5. pythonPackages.premailer: fix build

    (cherry picked from commit 1728793)
    Jonathan Ringer authored and Ma27 committed Oct 1, 2019
    Copy the full SHA
    8d7f2c7 View commit details
  6. python3Packages.scikit-build: fix build

    Build broke as it's attempted to run the cmake configure-phase which
    won't work as this package uses cmake, but builds via a `setup.py`
    rather than a `CMakeLists.txt`.
    
    ZHF #68361
    
    (cherry picked from commit f8c6b82)
    Ma27 committed Oct 1, 2019
    Copy the full SHA
    c0fcb53 View commit details
  7. python3Packages.pytaglib: fix build

    Applied several patches to fix the test suite on python 2.7 and to
    properly install the `pyprinttags` executable. Also switched to the
    GitHub source for now as the PyPI tarball was wrongly packaged and
    didn't contain the `pyprinttags.py` script (see the last two patches for
    further reference).
    
    See also https://hydra.nixos.org/build/102493330
    
    ZHF #68361
    
    (cherry picked from commit c7164ea)
    Ma27 committed Oct 1, 2019
    Copy the full SHA
    e61638d View commit details
  8. Copy the full SHA
    4c50dc3 View commit details
  9. linux: 5.2.17 -> 5.2.18

    NeQuissimus committed Oct 1, 2019
    Copy the full SHA
    2a66f18 View commit details
  10. linux: 5.3.1 -> 5.3.2

    NeQuissimus committed Oct 1, 2019
    Copy the full SHA
    1e3be23 View commit details
  11. transifex-client: Add missing setuptools dependency

    (cherry picked from commit d1a8006)
    etu committed Oct 1, 2019
    Copy the full SHA
    d7c9be9 View commit details
  12. nexcloud: 16.0.4 -> 16.0.5

    (cherry picked from commit 70d0887)
    Vskilet authored and Ma27 committed Oct 1, 2019
    Copy the full SHA
    000a910 View commit details
  13. Revert "nixos/desktop-managers/xterm: Disable by default"

    This reverts commit f140dfb.
    This reverts commit cf56cef.
    This reverts commit 456c42c.
    matthewbauer committed Oct 1, 2019
    Copy the full SHA
    eafcb18 View commit details
  14. lib: Add armv7a-linux to doubles.nix

    This is needed for android.
    Ericson2314 committed Oct 1, 2019
    Copy the full SHA
    3098d65 View commit details
  15. svgbob: fix build

    See https://hydra.nixos.org/build/102480738
    
    Bumping to latest version (which is 0.4.2 according to Cargo.lock) fixes
    the build error. As no dependency changes happened, cargoSha256 doesn't
    need to be updated.
    
    ZHF #68361
    
    (cherry picked from commit b5204d9)
    Ma27 committed Oct 1, 2019
    Copy the full SHA
    2fc4fab View commit details
  16. Merge pull request #70195 from obsidiansystems/lib-more-arm

    lib: Add armv7a-linux to doubles.nix
    matthewbauer authored Oct 1, 2019
    Copy the full SHA
    c6de3b0 View commit details
  17. riot-web: 1.4.0 -> 1.4.1

    (cherry picked from commit bdd8693)
    pacien authored and Ma27 committed Oct 1, 2019
    Copy the full SHA
    e326c4f View commit details
  18. riot-desktop: 1.4.0 -> 1.4.1

    (cherry picked from commit 7a82c74)
    pacien authored and Ma27 committed Oct 1, 2019
    Copy the full SHA
    445ea37 View commit details
  19. grafana: 6.3.6 -> 6.4.0

    (cherry picked from commit 79b9909)
    WilliButz authored and Ma27 committed Oct 1, 2019
    Copy the full SHA
    d1ab891 View commit details
  20. buildBazelPackage: remove rules_cc

    It's a new builtin dependency from Bazel 0.29.
    
    (cherry picked from commit 280f17c)
    abbradar committed Oct 1, 2019
    Copy the full SHA
    e97e6ae View commit details
  21. owncloud-client: Use qt5's own mkDerivation (#70187)

    (cherry picked from commit e120e00)
    
    cc #70187
    tobiasBora authored and veprbl committed Oct 1, 2019
    Copy the full SHA
    9d4759d View commit details

Commits on Oct 2, 2019

  1. Merge pull request #70183 from etu/1909-transifex-client-setuptools

    [19.09] transifex-client: Add missing setuptools dependency
    worldofpeace authored Oct 2, 2019
    Copy the full SHA
    584181e View commit details
  2. kwallet-pam: wrap pam_kwallet_init

    This needs a compatible env as kwalletd daemon. Need to wrap it to
    correct this.
    
    Fixes #68316
    
    (cherry picked from commit a296cc2)
    matthewbauer authored and worldofpeace committed Oct 2, 2019
    Copy the full SHA
    d079834 View commit details
  3. pythonPackage.cli-helpers: disable python2 tests

    ZHF #68361
    
    (cherry picked from commit 7eed92a)
    Signed-off-by: Jonathan Ringer <jonringer117@gmail.com>
    Jonathan Ringer committed Oct 2, 2019
    Copy the full SHA
    15bc013 View commit details
  4. pythonPackages.pyrsistent: 0.15.2 -> 0.15.4

    ZHF #68361
    
    (cherry picked from commit 0f8d112)
    Signed-off-by: Jonathan Ringer <jonringer117@gmail.com>
    adisbladis authored and Jonathan Ringer committed Oct 2, 2019
    Copy the full SHA
    20e214b View commit details
  5. nvidia-x11: Make vulkan library path absolute for >= 435.

    The original file contains just a library name, which does not work when LD_LIBRARY_PATH does not contain /run/opengl-driver/lib, as is the case in unstable NixOS.
    
    Fixes #69264
    
    (cherry picked from commit d156b2b)
    ambrop72 authored and abbradar committed Oct 2, 2019
    Copy the full SHA
    8aac337 View commit details
  6. exim: 4.92.2 -> 4.92.3

    security update: CVE-2019-16928
    
    (cherry picked from commit aaa1ba3)
    
    cc #70074
    pacien authored and fpletz committed Oct 2, 2019
    Copy the full SHA
    59211d5 View commit details
  7. tensorflow: fix CUDA build using wrong GCC

    (cherry picked from commit 46b7933)
    abbradar committed Oct 2, 2019
    Copy the full SHA
    be0688d View commit details
  8. libtensorflow: add meta

    (cherry picked from commit 4947ddf)
    abbradar committed Oct 2, 2019
    Copy the full SHA
    433022f View commit details
  9. tensorflow: add OpenGL path to find libcudart

    (cherry picked from commit 1c429ac)
    abbradar committed Oct 2, 2019
    Copy the full SHA
    bb7c495 View commit details
  10. Copy the full SHA
    0c02d01 View commit details
  11. ruby_2_5: 2.5.6 -> 2.5.7

    marsam authored and alyssais committed Oct 2, 2019
    Copy the full SHA
    cb9cea0 View commit details
  12. ruby_2_6: 2.6.4 -> 2.6.5

    marsam authored and alyssais committed Oct 2, 2019
    Copy the full SHA
    85289ed View commit details
  13. vulnix: add missing setuptools dependency

    More #68314 related breakage.
    
    (cherry picked from commit 01aa4bb)
    delroth authored and worldofpeace committed Oct 2, 2019
    Copy the full SHA
    e0a544c View commit details
  14. xterm: 348 -> 349

    Semi-automatic update generated by
    https://github.com/ryantm/nixpkgs-update tools. This update was made
    based on information from
    https://repology.org/metapackage/xterm/versions
    
    (cherry picked from commit 3062ec7)
    r-ryantm authored and Ma27 committed Oct 2, 2019
    Copy the full SHA
    1f65fe6 View commit details
  15. lib.mkRemovedOptionModule: Show replacement for option usage too

    Previously mkRemovedOptionModule would only show the replacement
    instructions when the removed option was *defined*. With this change, it
    also does so when an option is *used*.
    
    This is essential for options that are only intended to be used such as
    `security.acme.directory`, whose replacement instructions would never
    trigger without this change because almost everybody only uses the
    option and isn't defining it.
    
    (cherry picked from commit ebb136d)
    infinisil committed Oct 2, 2019
    Copy the full SHA
    482ba41 View commit details
Showing 431 changed files with 25,746 additions and 9,956 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -44,9 +44,9 @@ Nixpkgs and NixOS are built and tested by our continuous integration
system, [Hydra](https://hydra.nixos.org/).

* [Continuous package builds for unstable/master](https://hydra.nixos.org/jobset/nixos/trunk-combined)
* [Continuous package builds for the NixOS 19.03 release](https://hydra.nixos.org/jobset/nixos/release-19.03)
* [Continuous package builds for the NixOS 19.09 release](https://hydra.nixos.org/jobset/nixos/release-19.09)
* [Tests for unstable/master](https://hydra.nixos.org/job/nixos/trunk-combined/tested#tabs-constituents)
* [Tests for the NixOS 19.03 release](https://hydra.nixos.org/job/nixos/release-19.03/tested#tabs-constituents)
* [Tests for the NixOS 19.09 release](https://hydra.nixos.org/job/nixos/release-19.09/tested#tabs-constituents)

Artifacts successfully built with Hydra are published to cache at
https://cache.nixos.org/. When successful build and test criteria are
15 changes: 1 addition & 14 deletions doc/languages-frameworks/beam.xml
Original file line number Diff line number Diff line change
@@ -55,20 +55,7 @@
<title>Rebar3</title>

<para>
By default, Rebar3 wants to manage its own dependencies. This is perfectly acceptable in the normal, non-Nix setup, but in the Nix world, it is not. To rectify this, we provide two versions of Rebar3:
<itemizedlist>
<listitem>
<para>
<literal>rebar3</literal>: patched to remove the ability to download anything. When not running it via <literal>nix-shell</literal> or <literal>nix-build</literal>, it's probably not going to work as desired.
</para>
</listitem>
<listitem>
<para>
<literal>rebar3-open</literal>: the normal, unmodified Rebar3. It should work exactly as would any other version of Rebar3. Any Erlang package should rely on <literal>rebar3</literal> instead. See <xref
linkend="rebar3-packages"/>.
</para>
</listitem>
</itemizedlist>
We provide a version of Rebar3, which is the normal, unmodified Rebar3, under <literal>rebar3</literal>. We also provide a helper to fetch Rebar3 dependencies from a lockfile under <literal>fetchRebar3Deps</literal>.
</para>
</section>

12 changes: 8 additions & 4 deletions lib/modules.nix
Original file line number Diff line number Diff line change
@@ -591,12 +591,16 @@ rec {
{ options, ... }:
{ options = setAttrByPath optionName (mkOption {
visible = false;
apply = x: throw "The option `${showOption optionName}' can no longer be used since it's been removed. ${replacementInstructions}";
});
config.warnings =
let opt = getAttrFromPath optionName options; in
optional opt.isDefined ''
config.assertions =
let opt = getAttrFromPath optionName options; in [{
assertion = !opt.isDefined;
message = ''
The option definition `${showOption optionName}' in ${showFiles opt.files} no longer has any effect; please remove it.
${replacementInstructions}'';
${replacementInstructions}
'';
}];
};

/* Return a module that causes a warning to be shown if the
2 changes: 1 addition & 1 deletion lib/systems/doubles.nix
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ let

all = [
"aarch64-linux"
"armv5tel-linux" "armv6l-linux" "armv7l-linux"
"armv5tel-linux" "armv6l-linux" "armv7a-linux" "armv7l-linux"

"mipsel-linux"

4 changes: 2 additions & 2 deletions lib/tests/systems.nix
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@ let
in with lib.systems.doubles; lib.runTests {
testall = mseteq all (linux ++ darwin ++ freebsd ++ openbsd ++ netbsd ++ illumos ++ wasi ++ windows ++ embedded);

testarm = mseteq arm [ "armv5tel-linux" "armv6l-linux" "armv7l-linux" "arm-none" "armv7a-darwin" ];
testarm = mseteq arm [ "armv5tel-linux" "armv6l-linux" "armv7a-linux" "armv7l-linux" "arm-none" "armv7a-darwin" ];
testi686 = mseteq i686 [ "i686-linux" "i686-freebsd" "i686-netbsd" "i686-openbsd" "i686-cygwin" "i686-windows" "i686-none" "i686-darwin" ];
testmips = mseteq mips [ "mipsel-linux" ];
testx86_64 = mseteq x86_64 [ "x86_64-linux" "x86_64-darwin" "x86_64-freebsd" "x86_64-openbsd" "x86_64-netbsd" "x86_64-cygwin" "x86_64-solaris" "x86_64-windows" "x86_64-none" ];
@@ -24,7 +24,7 @@ in with lib.systems.doubles; lib.runTests {
testfreebsd = mseteq freebsd [ "i686-freebsd" "x86_64-freebsd" ];
testgnu = mseteq gnu (linux /* ++ kfreebsd ++ ... */);
testillumos = mseteq illumos [ "x86_64-solaris" ];
testlinux = mseteq linux [ "aarch64-linux" "armv5tel-linux" "armv6l-linux" "armv7l-linux" "i686-linux" "mipsel-linux" "riscv32-linux" "riscv64-linux" "x86_64-linux" "powerpc64le-linux" ];
testlinux = mseteq linux [ "aarch64-linux" "armv5tel-linux" "armv6l-linux" "armv7a-linux" "armv7l-linux" "i686-linux" "mipsel-linux" "riscv32-linux" "riscv64-linux" "x86_64-linux" "powerpc64le-linux" ];
testnetbsd = mseteq netbsd [ "i686-netbsd" "x86_64-netbsd" ];
testopenbsd = mseteq openbsd [ "i686-openbsd" "x86_64-openbsd" ];
testwindows = mseteq windows [ "i686-cygwin" "x86_64-cygwin" "i686-windows" "x86_64-windows" ];
32 changes: 26 additions & 6 deletions nixos/doc/manual/administration/boot-problems.xml
Original file line number Diff line number Diff line change
@@ -6,15 +6,22 @@
<title>Boot Problems</title>

<para>
If NixOS fails to boot, there are a number of kernel command line parameters that may help you to identify or fix the issue. You can add these parameters in the GRUB boot menu by pressing “e” to modify the selected boot entry and editing the line starting with <literal>linux</literal>. The following are some useful kernel command line parameters that are recognised by the NixOS boot scripts or by systemd:
If NixOS fails to boot, there are a number of kernel command line parameters
that may help you to identify or fix the issue. You can add these parameters
in the GRUB boot menu by pressing “e” to modify the selected boot entry
and editing the line starting with <literal>linux</literal>. The following
are some useful kernel command line parameters that are recognised by the
NixOS boot scripts or by systemd:
<variablelist>
<varlistentry>
<term>
<literal>boot.shell_on_fail</literal>
</term>
<listitem>
<para>
Start a root shell if something goes wrong in stage 1 of the boot process (the initial ramdisk). This is disabled by default because there is no authentication for the root shell.
Start a root shell if something goes wrong in stage 1 of the boot process
(the initial ramdisk). This is disabled by default because there is no
authentication for the root shell.
</para>
</listitem>
</varlistentry>
@@ -24,7 +31,10 @@
</term>
<listitem>
<para>
Start an interactive shell in stage 1 before anything useful has been done. That is, no modules have been loaded and no file systems have been mounted, except for <filename>/proc</filename> and <filename>/sys</filename>.
Start an interactive shell in stage 1 before anything useful has been
done. That is, no modules have been loaded and no file systems have been
mounted, except for <filename>/proc</filename> and
<filename>/sys</filename>.
</para>
</listitem>
</varlistentry>
@@ -44,7 +54,11 @@
</term>
<listitem>
<para>
Boot into rescue mode (a.k.a. single user mode). This will cause systemd to start nothing but the unit <literal>rescue.target</literal>, which runs <command>sulogin</command> to prompt for the root password and start a root login shell. Exiting the shell causes the system to continue with the normal boot process.
Boot into rescue mode (a.k.a. single user mode). This will cause systemd
to start nothing but the unit <literal>rescue.target</literal>, which
runs <command>sulogin</command> to prompt for the root password and start
a root login shell. Exiting the shell causes the system to continue with
the normal boot process.
</para>
</listitem>
</varlistentry>
@@ -54,7 +68,8 @@
</term>
<listitem>
<para>
Make systemd very verbose and send log messages to the console instead of the journal.
Make systemd very verbose and send log messages to the console instead of
the journal.
</para>
</listitem>
</varlistentry>
@@ -65,6 +80,11 @@
</para>

<para>
If no login prompts or X11 login screens appear (e.g. due to hanging dependencies), you can press Alt+ArrowUp. If you’re lucky, this will start rescue mode (described above). (Also note that since most units have a 90-second timeout before systemd gives up on them, the <command>agetty</command> login prompts should appear eventually unless something is very wrong.)
If no login prompts or X11 login screens appear (e.g. due to hanging
dependencies), you can press Alt+ArrowUp. If you’re lucky, this will start
rescue mode (described above). (Also note that since most units have a
90-second timeout before systemd gives up on them, the
<command>agetty</command> login prompts should appear eventually unless
something is very wrong.)
</para>
</section>
32 changes: 24 additions & 8 deletions nixos/doc/manual/administration/cleaning-store.xml
Original file line number Diff line number Diff line change
@@ -5,43 +5,59 @@
xml:id="sec-nix-gc">
<title>Cleaning the Nix Store</title>
<para>
Nix has a purely functional model, meaning that packages are never upgraded in place. Instead new versions of packages end up in a different location in the Nix store (<filename>/nix/store</filename>). You should periodically run Nix’s <emphasis>garbage collector</emphasis> to remove old, unreferenced packages. This is easy:
Nix has a purely functional model, meaning that packages are never upgraded
in place. Instead new versions of packages end up in a different location in
the Nix store (<filename>/nix/store</filename>). You should periodically run
Nix’s <emphasis>garbage collector</emphasis> to remove old, unreferenced
packages. This is easy:
<screen>
<prompt>$ </prompt>nix-collect-garbage
</screen>
Alternatively, you can use a systemd unit that does the same in the background:
Alternatively, you can use a systemd unit that does the same in the
background:
<screen>
<prompt># </prompt>systemctl start nix-gc.service
</screen>
You can tell NixOS in <filename>configuration.nix</filename> to run this unit automatically at certain points in time, for instance, every night at 03:15:
You can tell NixOS in <filename>configuration.nix</filename> to run this unit
automatically at certain points in time, for instance, every night at 03:15:
<programlisting>
<xref linkend="opt-nix.gc.automatic"/> = true;
<xref linkend="opt-nix.gc.dates"/> = "03:15";
</programlisting>
</para>
<para>
The commands above do not remove garbage collector roots, such as old system configurations. Thus they do not remove the ability to roll back to previous configurations. The following command deletes old roots, removing the ability to roll back to them:
The commands above do not remove garbage collector roots, such as old system
configurations. Thus they do not remove the ability to roll back to previous
configurations. The following command deletes old roots, removing the ability
to roll back to them:
<screen>
<prompt>$ </prompt>nix-collect-garbage -d
</screen>
You can also do this for specific profiles, e.g.
<screen>
<prompt>$ </prompt>nix-env -p /nix/var/nix/profiles/per-user/eelco/profile --delete-generations old
</screen>
Note that NixOS system configurations are stored in the profile <filename>/nix/var/nix/profiles/system</filename>.
Note that NixOS system configurations are stored in the profile
<filename>/nix/var/nix/profiles/system</filename>.
</para>
<para>
Another way to reclaim disk space (often as much as 40% of the size of the Nix store) is to run Nix’s store optimiser, which seeks out identical files in the store and replaces them with hard links to a single copy.
Another way to reclaim disk space (often as much as 40% of the size of the
Nix store) is to run Nix’s store optimiser, which seeks out identical files
in the store and replaces them with hard links to a single copy.
<screen>
<prompt>$ </prompt>nix-store --optimise
</screen>
Since this command needs to read the entire Nix store, it can take quite a while to finish.
Since this command needs to read the entire Nix store, it can take quite a
while to finish.
</para>
<section xml:id="sect-nixos-gc-boot-entries">
<title>NixOS Boot Entries</title>

<para>
If your <filename>/boot</filename> partition runs out of space, after clearing old profiles you must rebuild your system with <literal>nixos-rebuild</literal> to update the <filename>/boot</filename> partition and clear space.
If your <filename>/boot</filename> partition runs out of space, after
clearing old profiles you must rebuild your system with
<literal>nixos-rebuild</literal> to update the <filename>/boot</filename>
partition and clear space.
</para>
</section>
</chapter>
26 changes: 21 additions & 5 deletions nixos/doc/manual/administration/container-networking.xml
Original file line number Diff line number Diff line change
@@ -6,7 +6,10 @@
<title>Container Networking</title>

<para>
When you create a container using <literal>nixos-container create</literal>, it gets it own private IPv4 address in the range <literal>10.233.0.0/16</literal>. You can get the container’s IPv4 address as follows:
When you create a container using <literal>nixos-container create</literal>,
it gets it own private IPv4 address in the range
<literal>10.233.0.0/16</literal>. You can get the container’s IPv4 address
as follows:
<screen>
<prompt># </prompt>nixos-container show-ip foo
10.233.4.2
@@ -17,21 +20,34 @@
</para>

<para>
Networking is implemented using a pair of virtual Ethernet devices. The network interface in the container is called <literal>eth0</literal>, while the matching interface in the host is called <literal>ve-<replaceable>container-name</replaceable></literal> (e.g., <literal>ve-foo</literal>). The container has its own network namespace and the <literal>CAP_NET_ADMIN</literal> capability, so it can perform arbitrary network configuration such as setting up firewall rules, without affecting or having access to the host’s network.
Networking is implemented using a pair of virtual Ethernet devices. The
network interface in the container is called <literal>eth0</literal>, while
the matching interface in the host is called
<literal>ve-<replaceable>container-name</replaceable></literal> (e.g.,
<literal>ve-foo</literal>). The container has its own network namespace and
the <literal>CAP_NET_ADMIN</literal> capability, so it can perform arbitrary
network configuration such as setting up firewall rules, without affecting or
having access to the host’s network.
</para>

<para>
By default, containers cannot talk to the outside network. If you want that, you should set up Network Address Translation (NAT) rules on the host to rewrite container traffic to use your external IP address. This can be accomplished using the following configuration on the host:
By default, containers cannot talk to the outside network. If you want that,
you should set up Network Address Translation (NAT) rules on the host to
rewrite container traffic to use your external IP address. This can be
accomplished using the following configuration on the host:
<programlisting>
<xref linkend="opt-networking.nat.enable"/> = true;
<xref linkend="opt-networking.nat.internalInterfaces"/> = ["ve-+"];
<xref linkend="opt-networking.nat.externalInterface"/> = "eth0";
</programlisting>
where <literal>eth0</literal> should be replaced with the desired external interface. Note that <literal>ve-+</literal> is a wildcard that matches all container interfaces.
where <literal>eth0</literal> should be replaced with the desired external
interface. Note that <literal>ve-+</literal> is a wildcard that matches all
container interfaces.
</para>

<para>
If you are using Network Manager, you need to explicitly prevent it from managing container interfaces:
If you are using Network Manager, you need to explicitly prevent it from
managing container interfaces:
<programlisting>
networking.networkmanager.unmanaged = [ "interface-name:ve-*" ];
</programlisting>
19 changes: 16 additions & 3 deletions nixos/doc/manual/administration/containers.xml
Original file line number Diff line number Diff line change
@@ -5,15 +5,28 @@
xml:id="ch-containers">
<title>Container Management</title>
<para>
NixOS allows you to easily run other NixOS instances as <emphasis>containers</emphasis>. Containers are a light-weight approach to virtualisation that runs software in the container at the same speed as in the host system. NixOS containers share the Nix store of the host, making container creation very efficient.
NixOS allows you to easily run other NixOS instances as
<emphasis>containers</emphasis>. Containers are a light-weight approach to
virtualisation that runs software in the container at the same speed as in
the host system. NixOS containers share the Nix store of the host, making
container creation very efficient.
</para>
<warning>
<para>
Currently, NixOS containers are not perfectly isolated from the host system. This means that a user with root access to the container can do things that affect the host. So you should not give container root access to untrusted users.
Currently, NixOS containers are not perfectly isolated from the host system.
This means that a user with root access to the container can do things that
affect the host. So you should not give container root access to untrusted
users.
</para>
</warning>
<para>
NixOS containers can be created in two ways: imperatively, using the command <command>nixos-container</command>, and declaratively, by specifying them in your <filename>configuration.nix</filename>. The declarative approach implies that containers get upgraded along with your host system when you run <command>nixos-rebuild</command>, which is often not what you want. By contrast, in the imperative approach, containers are configured and updated independently from the host system.
NixOS containers can be created in two ways: imperatively, using the command
<command>nixos-container</command>, and declaratively, by specifying them in
your <filename>configuration.nix</filename>. The declarative approach implies
that containers get upgraded along with your host system when you run
<command>nixos-rebuild</command>, which is often not what you want. By
contrast, in the imperative approach, containers are configured and updated
independently from the host system.
</para>
<xi:include href="imperative-containers.xml" />
<xi:include href="declarative-containers.xml" />
Loading