Skip to content
This repository was archived by the owner on Apr 12, 2021. It is now read-only.
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-channels
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: cbb7c81ac6a8
Choose a base ref
...
head repository: NixOS/nixpkgs-channels
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 52c3a80050d0
Choose a head ref

Commits on Jun 15, 2020

  1. nixos/acme: turn around test probes' dependencies

    Reads a bit more naturally, and now the changes to the
    acme-${cert}.service actually reflect what would be needed were you to
    do the same in production.
    
    e.g.  "for dns-01, your service that needs the cert needs to pull in the
    cert"
    arianvp committed Jun 15, 2020

    Verified

    This commit was signed with the committer’s verified signature.
    primeos Michael Weiss
    Copy the full SHA
    61f8348 View commit details
  2. Verified

    This commit was signed with the committer’s verified signature.
    primeos Michael Weiss
    Copy the full SHA
    60247e8 View commit details
  3. nixos/acme: Make sure nginx is running before certs are requested

    This fixes NixOS/nixpkgs#81842
    
    We should probably also fix this for Apache, which recently also learned
    to use ACME.
    arianvp committed Jun 15, 2020

    Verified

    This commit was signed with the committer’s verified signature.
    primeos Michael Weiss
    Copy the full SHA
    681cc10 View commit details
  4. Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    NeQuissimus Tim Steinbach
    Copy the full SHA
    cfd672a View commit details
  5. Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    NeQuissimus Tim Steinbach
    Copy the full SHA
    0952336 View commit details

Commits on Jun 21, 2020

  1. Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    NeQuissimus Tim Steinbach
    Copy the full SHA
    560201d View commit details
  2. Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    NeQuissimus Tim Steinbach
    Copy the full SHA
    4e0109f View commit details
  3. Set mtime in even more places

    utdemir committed Jun 21, 2020

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    NeQuissimus Tim Steinbach
    Copy the full SHA
    a5a611c View commit details
  4. Verified

    This commit was signed with the committer’s verified signature.
    primeos Michael Weiss
    Copy the full SHA
    4ab7baf View commit details
  5. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    307804d View commit details
  6. Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    Ma27 Maximilian Bosch
    Copy the full SHA
    2640229 View commit details
  7. Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    andir Andreas Rammhold
    Copy the full SHA
    f1d7a09 View commit details
  8. Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    andir Andreas Rammhold
    Copy the full SHA
    4bff5b7 View commit details
  9. Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    andir Andreas Rammhold
    Copy the full SHA
    87a538e View commit details
  10. Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    andir Andreas Rammhold
    Copy the full SHA
    fe71abf View commit details
  11. Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    andir Andreas Rammhold
    Copy the full SHA
    1619952 View commit details

Commits on Jun 22, 2020

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    fa8f2bf View commit details
  2. Copy the full SHA
    c9e6a02 View commit details

Commits on Jun 28, 2020

  1. libosmium: run tests

    danieldk committed Jun 28, 2020
    Copy the full SHA
    619488c View commit details
  2. Copy the full SHA
    c54a705 View commit details
  3. osm2pgsql: 1.2.1 -> 1.2.2

    das-g committed Jun 28, 2020
    Copy the full SHA
    8a3419d View commit details
  4. Copy the full SHA
    056b0df View commit details

Commits on Jun 29, 2020

  1. Merge pull request #91735 from danieldk/osmium-tests

    osmium-tools: run tests, install man pages and zsh completions
    danieldk authored Jun 29, 2020
    Copy the full SHA
    3d4a02f View commit details
  2. Copy the full SHA
    5dfcb77 View commit details
  3. Merge pull request #91740 from das-g/osm2pgsql-1.2.2

    osm2pgsql: 1.2.1 -> 1.2.2
    danieldk authored Jun 29, 2020
    Copy the full SHA
    7419b8d View commit details
  4. osm2pgsql: use libosmium from nixpkgs

    das-g authored and danieldk committed Jun 29, 2020
    Copy the full SHA
    03f13ed View commit details
  5. osm2pgsql: use protozero from nixpkgs

    das-g authored and danieldk committed Jun 29, 2020
    Copy the full SHA
    f3ee53c View commit details
  6. Copy the full SHA
    928faf2 View commit details
  7. Merge pull request #91743 from das-g/osm2pgsql-with-libs-from-nixpkgs

    osm2pgsql: use libs from NixPkgs instead of vendored ones
    danieldk authored Jun 29, 2020
    Copy the full SHA
    bcdf475 View commit details
  8. Revert "traefik: unify TOML generation"

    This reverts commit a5e6901.
    
    yj doesn't distinguish floats and ints, which breaks some configs.
    lheckemann committed Jun 29, 2020
    Copy the full SHA
    5b8b201 View commit details
  9. Merge pull request #85223 from arianvp/acme-fix-nginx-after

    nixos/acme: Fix ordering of certificate requests (#81482)
    flokli authored Jun 29, 2020
    Copy the full SHA
    aed85b7 View commit details
  10. Merge pull request #91084 from utdemir/intro-stream-layered-image

    dockerTools: add streaming image support, improve speed and reduce IO
    flokli authored Jun 29, 2020
    Copy the full SHA
    52c3a80 View commit details
23 changes: 22 additions & 1 deletion doc/builders/images/dockertools.xml
Original file line number Diff line number Diff line change
@@ -166,7 +166,7 @@ hello latest de2bf4786de6 About a minute ago 25.2MB
<title>buildLayeredImage</title>

<para>
Create a Docker image with many of the store paths being on their own layer to improve sharing between images.
Create a Docker image with many of the store paths being on their own layer to improve sharing between images. The image is realized into the Nix store as a gzipped tarball. Depending on the intended usage, many users might prefer to use <function>streamLayeredImage</function> instead, which this function uses internally.
</para>

<variablelist>
@@ -327,6 +327,27 @@ pkgs.dockerTools.buildLayeredImage {
</section>
</section>

<section xml:id="ssec-pkgs-dockerTools-streamLayeredImage">
<title>streamLayeredImage</title>

<para>
Builds a script which, when run, will stream an uncompressed tarball of a Docker image to stdout. The arguments to this function are as for <function>buildLayeredImage</function>. This method of constructing an image does not realize the image into the Nix store, so it saves on IO and disk/cache space, particularly with large images.
</para>

<para>
The image produced by running the output script can be piped directly into <command>docker load</command>, to load it into the local docker daemon:
<screen><![CDATA[
$(nix-build) | docker load
]]></screen>
</para>
<para>
Alternatively, the image be piped via <command>gzip</command> into <command>skopeo</command>, e.g. to copy it into a registry:
<screen><![CDATA[
$(nix-build) | gzip --fast | skopeo copy docker-archive:/dev/stdin docker://some_docker_registry/myimage:tag
]]></screen>
</para>
</section>

<section xml:id="ssec-pkgs-dockerTools-fetchFromRegistry">
<title>pullImage</title>

Original file line number Diff line number Diff line change
@@ -708,6 +708,7 @@ in
wantedBy = [ "multi-user.target" ];
wants = concatLists (map (hostOpts: [ "acme-${hostOpts.hostName}.service" "acme-selfsigned-${hostOpts.hostName}.service" ]) vhostsACME);
after = [ "network.target" "fs.target" ] ++ map (hostOpts: "acme-selfsigned-${hostOpts.hostName}.service") vhostsACME;
before = map (hostOpts: "acme-${hostOpts.hostName}.service") vhostsACME;

path = [ pkg pkgs.coreutils pkgs.gnugrep ];

4 changes: 4 additions & 0 deletions nixos/modules/services/web-servers/nginx/default.nix
Original file line number Diff line number Diff line change
@@ -693,6 +693,10 @@ in
wantedBy = [ "multi-user.target" ];
wants = concatLists (map (vhostConfig: ["acme-${vhostConfig.serverName}.service" "acme-selfsigned-${vhostConfig.serverName}.service"]) acmeEnabledVhosts);
after = [ "network.target" ] ++ map (vhostConfig: "acme-selfsigned-${vhostConfig.serverName}.service") acmeEnabledVhosts;
# Nginx needs to be started in order to be able to request certificates
# (it's hosting the acme challenge after all)
# This fixes https://github.com/NixOS/nixpkgs/issues/81842
before = map (vhostConfig: "acme-${vhostConfig.serverName}.service") acmeEnabledVhosts;
stopIfChanged = false;
preStart = ''
${cfg.preStart}
4 changes: 2 additions & 2 deletions nixos/modules/services/web-servers/traefik.nix
Original file line number Diff line number Diff line change
@@ -20,10 +20,10 @@ let
in valueType;
dynamicConfigFile = if cfg.dynamicConfigFile == null then
pkgs.runCommand "config.toml" {
buildInputs = [ pkgs.yj ];
buildInputs = [ pkgs.remarshal ];
preferLocalBuild = true;
} ''
yj -jt -i \
remarshal -if json -of toml \
< ${
pkgs.writeText "dynamic_config.json"
(builtins.toJSON cfg.dynamicConfigOptions)
62 changes: 45 additions & 17 deletions nixos/tests/acme.nix
Original file line number Diff line number Diff line change
@@ -48,10 +48,9 @@ in import ./make-test-python.nix ({ lib, ... }: {
security.acme.certs."standalone.test" = {
webroot = "/var/lib/acme/acme-challenges";
};
systemd.targets."acme-finished-standalone.test" = {};
systemd.services."acme-standalone.test" = {
wants = [ "acme-finished-standalone.test.target" ];
before = [ "acme-finished-standalone.test.target" ];
systemd.targets."acme-finished-standalone.test" = {
after = [ "acme-standalone.test.service" ];
wantedBy = [ "acme-standalone.test.service" ];
};
services.nginx.enable = true;
services.nginx.virtualHosts."standalone.test" = {
@@ -68,11 +67,9 @@ in import ./make-test-python.nix ({ lib, ... }: {

# A target remains active. Use this to probe the fact that
# a service fired eventhough it is not RemainAfterExit
systemd.targets."acme-finished-a.example.test" = {};
systemd.services."acme-a.example.test" = {
wants = [ "acme-finished-a.example.test.target" ];
before = [ "acme-finished-a.example.test.target" ];
after = [ "nginx.service" ];
systemd.targets."acme-finished-a.example.test" = {
after = [ "acme-a.example.test.service" ];
wantedBy = [ "acme-a.example.test.service" ];
};

services.nginx.enable = true;
@@ -89,11 +86,9 @@ in import ./make-test-python.nix ({ lib, ... }: {
security.acme.server = "https://acme.test/dir";

specialisation.second-cert.configuration = {pkgs, ...}: {
systemd.targets."acme-finished-b.example.test" = {};
systemd.services."acme-b.example.test" = {
wants = [ "acme-finished-b.example.test.target" ];
before = [ "acme-finished-b.example.test.target" ];
after = [ "nginx.service" ];
systemd.targets."acme-finished-b.example.test" = {
after = [ "acme-b.example.test.service" ];
wantedBy = [ "acme-b.example.test.service" ];
};
services.nginx.virtualHosts."b.example.test" = {
enableACME = true;
@@ -104,6 +99,7 @@ in import ./make-test-python.nix ({ lib, ... }: {
'';
};
};

specialisation.dns-01.configuration = {pkgs, config, nodes, lib, ...}: {
security.acme.certs."example.test" = {
domain = "*.example.test";
@@ -115,10 +111,12 @@ in import ./make-test-python.nix ({ lib, ... }: {
user = config.services.nginx.user;
group = config.services.nginx.group;
};
systemd.targets."acme-finished-example.test" = {};
systemd.targets."acme-finished-example.test" = {
after = [ "acme-example.test.service" ];
wantedBy = [ "acme-example.test.service" ];
};
systemd.services."acme-example.test" = {
wants = [ "acme-finished-example.test.target" ];
before = [ "acme-finished-example.test.target" "nginx.service" ];
before = [ "nginx.service" ];
wantedBy = [ "nginx.service" ];
};
services.nginx.virtualHosts."c.example.test" = {
@@ -132,6 +130,26 @@ in import ./make-test-python.nix ({ lib, ... }: {
'';
};
};

# When nginx depends on a service that is slow to start up, requesting used to fail
# certificates fail. Reproducer for https://github.com/NixOS/nixpkgs/issues/81842
specialisation.slow-startup.configuration = { pkgs, config, nodes, lib, ...}: {
systemd.services.my-slow-service = {
wantedBy = [ "multi-user.target" "nginx.service" ];
before = [ "nginx.service" ];
preStart = "sleep 5";
script = "${pkgs.python3}/bin/python -m http.server";
};
systemd.targets."acme-finished-d.example.com" = {
after = [ "acme-d.example.com.service" ];
wantedBy = [ "acme-d.example.com.service" ];
};
services.nginx.virtualHosts."d.example.com" = {
forceSSL = true;
enableACME = true;
locations."/".proxyPass = "http://localhost:8000";
};
};
};

client = {nodes, lib, ...}: {
@@ -207,5 +225,15 @@ in import ./make-test-python.nix ({ lib, ... }: {
client.succeed(
"curl --cacert /tmp/ca.crt https://c.example.test/ | grep -qF 'hello world'"
)
with subtest("Can request certificate of nginx when startup is delayed"):
webserver.succeed(
"${switchToNewServer}"
)
webserver.succeed(
"/run/current-system/specialisation/slow-startup/bin/switch-to-configuration test"
)
webserver.wait_for_unit("acme-finished-d.example.com.target")
client.succeed("curl --cacert /tmp/ca.crt https://d.example.com/")
'';
})
35 changes: 32 additions & 3 deletions pkgs/applications/misc/osmium-tool/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
{ stdenv, fetchFromGitHub, cmake, libosmium, protozero, boost, bzip2, zlib, expat }:
{ stdenv
, fetchFromGitHub
, cmake
, installShellFiles
, pandoc
, boost
, bzip2
, expat
, libosmium
, protozero
, zlib
}:

stdenv.mkDerivation rec {
pname = "osmium-tool";
@@ -11,8 +22,26 @@ stdenv.mkDerivation rec {
sha256 = "13142hj8gfgj6w51a62hjzfmzic90xgrnnlnb70hpdqjy86bxv7j";
};

nativeBuildInputs = [ cmake ];
buildInputs = [ libosmium protozero boost bzip2 zlib expat ];
nativeBuildInputs = [
cmake
installShellFiles
pandoc
];

buildInputs = [
boost
bzip2
expat
libosmium
protozero
zlib
];

doCheck = true;

postInstall = ''
installShellCompletion --zsh ../zsh_completion/_osmium
'';

meta = with stdenv.lib; {
description = "Multipurpose command line tool for working with OpenStreetMap data based on the Osmium library";
Loading