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: 168d1031af49
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: 98e3b90b6c8f
Choose a head ref

Commits on May 16, 2019

  1. audit: Fix build with pkgsMusl.

    The previous patches no longer applied to the current code.
    
    Also declare necessary autoconf, automake, libtool dependencies.
    
    Without them, the musl build gets:
    
    		/build/audit-2.8.5/missing: line 81: aclocal-1.16: command not found
    		configure.ac:16: warning: macro 'AM_PROG_LIBTOOL' not found in library
    		sh: autom4te: not found
    nh2 committed May 16, 2019

    Verified

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

Commits on May 18, 2019

  1. Unverified

    This user has not yet uploaded their public signing key.
    Copy the full SHA
    5251cbb View commit details

Commits on May 22, 2019

  1. Copy the full SHA
    1aba791 View commit details
  2. thunderbird: 60.6.0 -> 60.7.0

    taku0 committed May 22, 2019

    Unverified

    This user has not yet uploaded their public signing key.
    Copy the full SHA
    f397dda View commit details

Commits on May 27, 2019

  1. docear: init at 1.2.0

    Stable URLs are only provided for older versions.
    unode committed May 27, 2019
    Copy the full SHA
    bd95c91 View commit details
  2. tetra-gtk-theme: 201905 -> 201905r1

    - Rename to adementary-theme, following upstream
    - Update to version 201905r1
    romildo committed May 27, 2019
    Copy the full SHA
    b2ccf38 View commit details
  3. nixos: add test for uwsgi

    LnL7 committed May 27, 2019
    Copy the full SHA
    8ce93e2 View commit details

Commits on May 30, 2019

  1. nixos/bird: Fix reload

    When calling reload, bird attempts to reload the file that was given in
    the command line. As the change of ${configFile} is never picked up,
    bird will just reload the old file.
    This way, the configuration is placed at a known location and updated.
    dasJ committed May 30, 2019
    Copy the full SHA
    672495d View commit details

Commits on May 31, 2019

  1. libfilezilla: 0.13.0 -> 0.16.0

    * pname
    * deps
    * try tests, disable due to failure
    dtzWill committed May 31, 2019
    Copy the full SHA
    7ad8872 View commit details
  2. filezilla: 3.31.0 -> 3.42.1

    dtzWill committed May 31, 2019
    Copy the full SHA
    971bea9 View commit details
  3. re2: 20140304 -> 20190401

    risicle committed May 31, 2019
    Copy the full SHA
    9ecdc72 View commit details
  4. Copy the full SHA
    6a1ade5 View commit details

Commits on Jun 1, 2019

  1. filezilla: add wrapper to set necessary FZ_DATADIR

    Filezilla fails to start currently, with the following message being
    shown in a lone dialog before the program exits:
    
    > Could not find the resource files for FileZilla, closing FileZilla.
    > You can set the data directory of FileZilla using the '--datadir
    > <custompath>' commandline option or by setting the FZ_DATADIR
    > environment variable.
    
    This commit adds a wrapper for the filezilla binary to set the
    environment variable to the package root, which fixes the issue.
    khumba committed Jun 1, 2019
    Copy the full SHA
    61940b8 View commit details
  2. cfr: 0.143 -> 0.145

    Semi-automatic update generated by
    https://github.com/ryantm/nixpkgs-update tools. This update was made
    based on information from
    https://repology.org/metapackage/cfr/versions
    r-ryantm committed Jun 1, 2019
    Copy the full SHA
    723d16a View commit details
  3. Copy the full SHA
    25a89d0 View commit details
  4. gzdoom: 4.0.0 -> 4.1.2

    Semi-automatic update generated by
    https://github.com/ryantm/nixpkgs-update tools. This update was made
    based on information from
    https://repology.org/metapackage/gzdoom/versions
    r-ryantm committed Jun 1, 2019
    Copy the full SHA
    ebcf546 View commit details
  5. git-quick-stats: init at 2.0.8

    Kierán Meinhardt committed Jun 1, 2019
    Copy the full SHA
    59dce9c View commit details

Commits on Jun 2, 2019

  1. kdevelop-pg-qt: 2.1.0 -> 2.2.0

    Semi-automatic update generated by
    https://github.com/ryantm/nixpkgs-update tools. This update was made
    based on information from
    https://repology.org/metapackage/kdevelop-pg-qt/versions
    r-ryantm committed Jun 2, 2019
    Copy the full SHA
    5309a54 View commit details
  2. Copy the full SHA
    bd89694 View commit details
  3. teeworlds: fetchSubmodules

    The languages and maps directories are submodules, and are not included
    in tarballs downloaded from GitHub. This results in an English-only game
    that can't run a server.
    alyssais committed Jun 2, 2019
    Copy the full SHA
    356938c View commit details
  4. Copy the full SHA
    0fb0238 View commit details
  5. Copy the full SHA
    d56d324 View commit details
  6. Copy the full SHA
    f24efd3 View commit details
  7. pythonPackages.gprof2dot: remove linux platform restriction

    appears to work on darwin
    risicle committed Jun 2, 2019
    Copy the full SHA
    3c79c31 View commit details

Commits on Jun 3, 2019

  1. tilt: 0.8.1 -> 0.8.8

    anton-dessiatov committed Jun 3, 2019
    Copy the full SHA
    1ae9db2 View commit details
  2. Copy the full SHA
    347bf16 View commit details
  3. gpxsee: 7.1 -> 7.8

    dywedir committed Jun 3, 2019
    Copy the full SHA
    99c0867 View commit details

Commits on Jun 4, 2019

  1. Copy the full SHA
    52208c3 View commit details
  2. iperf2: make binary symlink & prioritize iperf3

    If both are in the environment, iperf3 should be used as `bin/iperf`
    by default, for more consistency.
    Profpatsch committed Jun 4, 2019
    Copy the full SHA
    ff13282 View commit details
  3. waybar: 0.6.6 -> 0.6.7

    Synthetica9 committed Jun 4, 2019
    Copy the full SHA
    8cc768b View commit details
  4. waybar: DRY refactor

    Synthetica9 committed Jun 4, 2019
    Copy the full SHA
    9d127b7 View commit details
  5. Copy the full SHA
    49ddc4e View commit details
  6. Copy the full SHA
    0fc454c View commit details

Commits on Jun 5, 2019

  1. Copy the full SHA
    1420e7d View commit details

Commits on Jun 6, 2019

  1. libblockdev: add gptfdisk as a dependency

    This fixes #62749 (sgdisk needed for creating luks-encrypted ext4
    volumes via udisk2).
    lightbulbjim committed Jun 6, 2019
    Copy the full SHA
    c0f8a9f View commit details
  2. Copy the full SHA
    5278760 View commit details
  3. keychain: Add long description

    Copied from the project home page today.
    chreekat committed Jun 6, 2019
    Copy the full SHA
    a2d3873 View commit details
  4. Copy the full SHA
    0b37cf8 View commit details
  5. nixos/tests/docker-tools: check layer sharing with buildLayeredImage

    Adapted from grahamc's blog post on layered Docker images in Nix:
    
    https://grahamc.com/blog/nix-and-layered-docker-images
    danieldk committed Jun 6, 2019
    Copy the full SHA
    3b0d5b5 View commit details

Commits on Jun 7, 2019

  1. Copy the full SHA
    87d266f View commit details
  2. Copy the full SHA
    ae67c00 View commit details
  3. Copy the full SHA
    1bb093e View commit details
  4. Copy the full SHA
    367dfad View commit details
  5. tor-browser-bundle: 8.5 -> 8.5.1, security fix!

    I think the source variant needs special handling, sorry.
    dtzWill committed Jun 7, 2019
    Copy the full SHA
    88dc069 View commit details
  6. Copy the full SHA
    5ff9102 View commit details
  7. rtv: 1.26.0 -> 1.27.0

    dtzWill committed Jun 7, 2019
    Copy the full SHA
    2fcdf4a View commit details
  8. 1password: 0.5.6 -> 0.5.6-003

    marsam committed Jun 7, 2019
    Copy the full SHA
    4c127d4 View commit details
  9. Merge pull request #62449 from r-ryantm/auto-update/kdevelop-pg-qt

    kdevelop-pg-qt: 2.1.0 -> 2.2.0
    c0bw3b authored Jun 7, 2019
    Copy the full SHA
    7558624 View commit details
  10. esniper: update to latest git revision "Version_2_35_0-15-g91d2665"

    The latest release no longer works.
    peti committed Jun 7, 2019
    Copy the full SHA
    3a64e98 View commit details
  11. Merge pull request #62431 from r-ryantm/auto-update/gzdoom

    gzdoom: 4.0.0 -> 4.1.2
    c0bw3b authored Jun 7, 2019
    Copy the full SHA
    0e54f49 View commit details
Showing with 2,468 additions and 1,852 deletions.
  1. +3 −3 doc/languages-frameworks/rust.section.md
  2. +10 −4 maintainers/maintainer-list.nix
  3. +11 −0 nixos/doc/manual/release-notes/rl-1909.xml
  4. +1 −0 nixos/modules/module-list.nix
  5. +2 −2 nixos/modules/programs/zsh/zsh.nix
  6. +15 −0 nixos/modules/services/audio/jack.nix
  7. +2 −0 nixos/modules/services/misc/zoneminder.nix
  8. +1 −0 nixos/modules/services/monitoring/prometheus/exporters.nix
  9. +42 −0 nixos/modules/services/monitoring/prometheus/exporters/wireguard.nix
  10. +11 −10 nixos/modules/services/networking/bird.nix
  11. +110 −0 nixos/modules/services/networking/mtprotoproxy.nix
  12. +1 −1 nixos/modules/services/networking/wireguard.nix
  13. +1 −0 nixos/tests/all-tests.nix
  14. +6 −0 nixos/tests/docker-tools.nix
  15. +23 −0 nixos/tests/prometheus-exporters.nix
  16. +38 −0 nixos/tests/uwsgi.nix
  17. +2 −2 pkgs/applications/audio/mopidy/iris.nix
  18. +6 −6 pkgs/applications/editors/android-studio/default.nix
  19. +2 −2 pkgs/applications/editors/kdevelop5/kdevelop-pg-qt.nix
  20. +2 −2 pkgs/applications/graphics/goxel/default.nix
  21. +2 −2 pkgs/applications/graphics/krita/default.nix
  22. +4 −4 pkgs/applications/misc/1password/default.nix
  23. +2 −2 pkgs/applications/misc/gallery-dl/default.nix
  24. +6 −15 pkgs/applications/misc/gpxsee/default.nix
  25. +2 −2 pkgs/applications/misc/kitty/default.nix
  26. +2 −2 pkgs/applications/misc/rtv/default.nix
  27. +12 −8 pkgs/applications/misc/waybar/default.nix
  28. +375 −435 pkgs/applications/networking/browsers/firefox-bin/beta_sources.nix
  29. +375 −435 pkgs/applications/networking/browsers/firefox-bin/devedition_sources.nix
  30. +397 −397 pkgs/applications/networking/browsers/firefox-bin/release_sources.nix
  31. +3 −3 pkgs/applications/networking/browsers/firefox/packages.nix
  32. +3 −3 pkgs/applications/networking/browsers/tor-browser-bundle-bin/default.nix
  33. +2 −4 pkgs/applications/networking/cluster/helmfile/default.nix
  34. +2 −2 pkgs/applications/networking/cluster/terraform/default.nix
  35. +4 −4 pkgs/applications/networking/cluster/tilt/default.nix
  36. +7 −6 pkgs/applications/networking/esniper/default.nix
  37. +6 −3 pkgs/applications/networking/ftp/filezilla/default.nix
  38. +2 −2 pkgs/applications/networking/irc/weechat/scripts/wee-slack/default.nix
  39. +6 −6 pkgs/applications/networking/irc/weechat/scripts/wee-slack/libpath.patch
  40. +55 −0 pkgs/applications/networking/mailreaders/aerc/default.nix
  41. +233 −233 pkgs/applications/networking/mailreaders/thunderbird-bin/release_sources.nix
  42. +2 −2 pkgs/applications/networking/mailreaders/thunderbird/default.nix
  43. +4 −0 pkgs/applications/networking/remote/freerdp/default.nix
  44. +2 −2 pkgs/applications/networking/syncthing/default.nix
  45. +11 −13 pkgs/applications/networking/websocketd/default.nix
  46. +0 −12 pkgs/applications/networking/websocketd/deps.nix
  47. +44 −0 pkgs/applications/office/docear/default.nix
  48. +8 −1 pkgs/applications/science/biology/neuron/default.nix
  49. +4 −4 pkgs/applications/science/math/gmsh/default.nix
  50. +2 −2 pkgs/applications/virtualization/virtualbox/default.nix
  51. +8 −0 pkgs/build-support/docker/examples.nix
  52. +7 −2 pkgs/build-support/trivial-builders.nix
  53. +4 −4 pkgs/data/themes/{tetra → adementary}/default.nix
  54. +10 −10 pkgs/development/compilers/shaderc/default.nix
  55. +2 −2 pkgs/development/interpreters/erlang/R21.nix
  56. +8 −2 pkgs/development/libraries/avahi/default.nix
  57. +2 −17 pkgs/development/libraries/editline/default.nix
  58. +6 −1 pkgs/development/libraries/gpgme/default.nix
  59. +10 −3 pkgs/development/libraries/libblockdev/default.nix
  60. +47 −0 pkgs/development/libraries/libblockdev/fix-paths.patch
  61. +8 −5 pkgs/development/libraries/libfilezilla/default.nix
  62. +17 −10 pkgs/development/libraries/re2/default.nix
  63. +27 −0 pkgs/development/python-modules/aiozeroconf/default.nix
  64. +2 −2 pkgs/development/python-modules/ansible/default.nix
  65. +2 −2 pkgs/development/python-modules/bjoern/default.nix
  66. +2 −2 pkgs/development/python-modules/boto3/default.nix
  67. +2 −2 pkgs/development/python-modules/botocore/default.nix
  68. +32 −7 pkgs/development/python-modules/django_silk/default.nix
  69. +4 −2 pkgs/development/python-modules/gprof2dot/default.nix
  70. +27 −0 pkgs/development/python-modules/ssdp/default.nix
  71. +2 −2 pkgs/development/tools/detect-secrets/default.nix
  72. +19 −0 pkgs/development/tools/git-quick-stats/default.nix
  73. +2 −2 pkgs/development/tools/java/cfr/default.nix
  74. +0 −6 pkgs/development/tools/misc/gdb/default.nix
  75. +2 −2 pkgs/games/gzdoom/default.nix
  76. +1 −1 pkgs/games/minetest/default.nix
  77. +1 −1 pkgs/games/super-tux-kart/default.nix
  78. +2 −1 pkgs/games/teeworlds/default.nix
  79. +1 −1 pkgs/games/voxelands/default.nix
  80. +1 −0 pkgs/misc/emulators/uae/default.nix
  81. +5 −5 pkgs/misc/uboot/rock64.nix
  82. +7 −7 pkgs/misc/uboot/rockpro64.nix
  83. +36 −0 pkgs/os-specific/darwin/chunkwm/default.nix
  84. +22 −11 pkgs/os-specific/linux/audit/default.nix
  85. +1 −0 pkgs/os-specific/linux/kernel/common-config.nix
  86. +2 −2 pkgs/os-specific/linux/kernel/linux-4.14.nix
  87. +2 −2 pkgs/os-specific/linux/kernel/linux-4.19.nix
  88. +2 −2 pkgs/os-specific/linux/kernel/linux-5.1.nix
  89. +3 −3 pkgs/os-specific/linux/kernel/linux-testing.nix
  90. +0 −26 pkgs/servers/dns/bind/darwin-openssl-linking-fix.patch
  91. +7 −1 pkgs/servers/dns/bind/default.nix
  92. +23 −7 pkgs/servers/jellyfin/default.nix
  93. +26 −0 pkgs/servers/monitoring/prometheus/wireguard-exporter.nix
  94. +60 −0 pkgs/servers/monitoring/sensu-go/default.nix
  95. +29 −0 pkgs/servers/mtprotoproxy/default.nix
  96. +14 −1 pkgs/servers/pulseaudio/default.nix
  97. +2 −2 pkgs/servers/sql/postgresql/ext/pgroonga.nix
  98. +3 −3 pkgs/shells/zsh/oh-my-zsh/default.nix
  99. +7 −7 pkgs/tools/admin/ansible/default.nix
  100. +2 −2 pkgs/tools/admin/awscli/default.nix
  101. +5 −5 pkgs/tools/misc/hyperfine/default.nix
  102. +12 −0 pkgs/tools/misc/keychain/default.nix
  103. +2 −2 pkgs/tools/misc/youtube-dl/default.nix
  104. +3 −3 pkgs/tools/networking/dnscrypt-proxy/2.x/default.nix
  105. +8 −0 pkgs/tools/networking/iperf/2.nix
  106. +4 −1 pkgs/tools/networking/iperf/3.nix
  107. +5 −6 pkgs/tools/networking/tgt/default.nix
  108. +3 −17 pkgs/tools/typesetting/sile/default.nix
  109. +27 −10 pkgs/top-level/all-packages.nix
  110. +10 −1 pkgs/top-level/metrics.nix
  111. +12 −1 pkgs/top-level/python-packages.nix
6 changes: 3 additions & 3 deletions doc/languages-frameworks/rust.section.md
Original file line number Diff line number Diff line change
@@ -336,9 +336,9 @@ with import <nixpkgs> {};
let src = fetchFromGitHub {
owner = "mozilla";
repo = "nixpkgs-mozilla";
# commit from: 2018-03-27
rev = "2945b0b6b2fd19e7d23bac695afd65e320efcebe";
sha256 = "034m1dryrzh2lmjvk3c0krgip652dql46w5yfwpvh7gavd3iypyw";
# commit from: 2019-05-15
rev = "9f35c4b09fd44a77227e79ff0c1b4b6a69dff533";
sha256 = "18h0nvh55b5an4gmlgfbvwbyqj91bklf1zymis6lbdh75571qaz0";
};
in
with import "${src.out}/rust-overlay.nix" pkgs pkgs;
14 changes: 10 additions & 4 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
@@ -820,10 +820,6 @@
github = "c0deaddict";
name = "Jos van Bakel";
};
c0dehero = {
email = "codehero@nerdpol.ch";
name = "CodeHero";
};
calbrecht = {
email = "christian.albrecht@mayflower.de";
github = "calbrecht";
@@ -4095,6 +4091,11 @@
email = "patrick.callahan@latitudeengineering.com";
name = "Patrick Callahan";
};
pyrolagus = {
email = "pyrolagus@gmail.com";
github = "PyroLagus";
name = "Danny Bautista";
};
q3k = {
email = "q3k@q3k.org";
github = "q3k";
@@ -5070,6 +5071,11 @@
github = "thedavidmeister";
name = "David Meister";
};
thefloweringash = {
email = "lorne@cons.org.nz";
github = "thefloweringash";
name = "Andrew Childs";
};
thesola10 = {
email = "thesola10@bobile.fr";
github = "thesola10";
11 changes: 11 additions & 0 deletions nixos/doc/manual/release-notes/rl-1909.xml
Original file line number Diff line number Diff line change
@@ -23,6 +23,11 @@
End of support is planned for end of April 2020, handing over to 20.03.
</para>
</listitem>
<listitem>
<para>
PHP now defaults to PHP 7.3, updated from 7.2.
</para>
</listitem>
</itemizedlist>
</section>

@@ -131,6 +136,12 @@
and <option>services.limesurvey.virtualHost</option> options.
</para>
</listitem>
<listitem>
<para>
The setopt declarations will be evaluated at the end of <literal>/etc/zshrc</literal>, so any code in <xref linkend="opt-programs.zsh.interactiveShellInit" />,
<xref linkend="opt-programs.zsh.loginShellInit" /> and <xref linkend="opt-programs.zsh.promptInit" /> may break if it relies on those options being set.
</para>
</listitem>
</itemizedlist>
</section>

1 change: 1 addition & 0 deletions nixos/modules/module-list.nix
Original file line number Diff line number Diff line change
@@ -610,6 +610,7 @@
./services/networking/morty.nix
./services/networking/miredo.nix
./services/networking/mstpd.nix
./services/networking/mtprotoproxy.nix
./services/networking/murmur.nix
./services/networking/mxisd.nix
./services/networking/namecoind.nix
4 changes: 2 additions & 2 deletions nixos/modules/programs/zsh/zsh.nix
Original file line number Diff line number Diff line change
@@ -194,8 +194,6 @@ in
HISTSIZE=${toString cfg.histSize}
HISTFILE=${cfg.histFile}
${optionalString (cfg.setOptions != []) "setopt ${concatStringsSep " " cfg.setOptions}"}
HELPDIR="${pkgs.zsh}/share/zsh/$ZSH_VERSION/help"
# Tell zsh how to find installed completions
@@ -209,6 +207,8 @@ in
${cfg.interactiveShellInit}
${optionalString (cfg.setOptions != []) "setopt ${concatStringsSep " " cfg.setOptions}"}
${zshAliases}
${cfg.promptInit}
15 changes: 15 additions & 0 deletions nixos/modules/services/audio/jack.nix
Original file line number Diff line number Diff line change
@@ -98,6 +98,20 @@ in {
'';
};

dmixConfig = mkOption {
type = types.lines;
default = "";
example = ''
period_size 2048
periods 2
'';
description = ''
For music production software that still doesn't support JACK natively you
would like to put buffer/period adjustments here
to decrease dmix device latency.
'';
};

session = mkOption {
type = types.lines;
description = ''
@@ -150,6 +164,7 @@ in {
ipc_key 219345
slave {
pcm loophw00
${cfg.loopback.dmixConfig}
}
}
pcm.asoftvol {
2 changes: 2 additions & 0 deletions nixos/modules/services/misc/zoneminder.nix
Original file line number Diff line number Diff line change
@@ -229,6 +229,8 @@ in {
location / {
try_files $uri $uri/ /index.php?$args =404;
rewrite ^/skins/.*/css/fonts/(.*)$ /fonts/$1 permanent;
location ~ /api/(css|img|ico) {
rewrite ^/api(.+)$ /api/app/webroot/$1 break;
try_files $uri $uri/ =404;
1 change: 1 addition & 0 deletions nixos/modules/services/monitoring/prometheus/exporters.nix
Original file line number Diff line number Diff line change
@@ -34,6 +34,7 @@ let
unifi = import ./exporters/unifi.nix { inherit config lib pkgs; };
varnish = import ./exporters/varnish.nix { inherit config lib pkgs; };
bind = import ./exporters/bind.nix { inherit config lib pkgs; };
wireguard = import ./exporters/wireguard.nix { inherit config lib pkgs; };
};

mkExporterOpts = ({ name, port }: {
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{ config, lib, pkgs }:

with lib;

let
cfg = config.services.prometheus.exporters.wireguard;
in {
port = 9586;
extraOpts = {
verbose = mkEnableOption "Verbose logging mode for prometheus-wireguard-exporter";

wireguardConfig = mkOption {
type = with types; nullOr (either path str);
default = null;

description = ''
Path to the Wireguard Config to
<link xlink:href="https://github.com/MindFlavor/prometheus_wireguard_exporter/tree/2.0.0#usage">add the peer's name to the stats of a peer</link>.
Please note that <literal>networking.wg-quick</literal> is required for this feature
as <literal>networking.wireguard</literal> uses
<citerefentry><refentrytitle>wg</refentrytitle><manvolnum>8</manvolnum></citerefentry>
to set the peers up.
'';
};
};
serviceOpts = {
script = ''
${pkgs.prometheus-wireguard-exporter}/bin/prometheus_wireguard_exporter \
-p ${toString cfg.port} \
${optionalString cfg.verbose "-v"} \
${optionalString (cfg.wireguardConfig != null) "-n ${cfg.wireguardConfig}"}
'';

path = [ pkgs.wireguard-tools ];

serviceConfig = {
DynamicUser = true;
AmbientCapabilities = [ "CAP_NET_ADMIN" ];
};
};
}
21 changes: 11 additions & 10 deletions nixos/modules/services/networking/bird.nix
Original file line number Diff line number Diff line change
@@ -14,15 +14,6 @@ let
bird6 = "1.9.x with IPv6 suport";
bird2 = "2.x";
}.${variant};
configFile = pkgs.stdenv.mkDerivation {
name = "${variant}.conf";
text = cfg.config;
preferLocalBuild = true;
buildCommand = ''
echo -n "$text" > $out
${pkg}/bin/${birdBin} -d -p -c $out
'';
};
in {
###### interface
options = {
@@ -41,14 +32,24 @@ let
###### implementation
config = mkIf cfg.enable {
environment.systemPackages = [ pkg ];

environment.etc."bird/${variant}.conf".source = pkgs.writeTextFile {
name = "${variant}.conf";
text = cfg.config;
checkPhase = ''
${pkg}/bin/${birdBin} -d -p -c $out
'';
};

systemd.services.${variant} = {
description = "BIRD Internet Routing Daemon (${descr})";
wantedBy = [ "multi-user.target" ];
reloadIfChanged = true;
restartTriggers = [ config.environment.etc."bird/${variant}.conf".source ];
serviceConfig = {
Type = "forking";
Restart = "on-failure";
ExecStart = "${pkg}/bin/${birdBin} -c ${configFile} -u ${variant} -g ${variant}";
ExecStart = "${pkg}/bin/${birdBin} -c /etc/bird/${variant}.conf -u ${variant} -g ${variant}";
ExecReload = "${pkg}/bin/${birdc} configure";
ExecStop = "${pkg}/bin/${birdc} down";
CapabilityBoundingSet = [ "CAP_CHOWN" "CAP_FOWNER" "CAP_DAC_OVERRIDE" "CAP_SETUID" "CAP_SETGID"
110 changes: 110 additions & 0 deletions nixos/modules/services/networking/mtprotoproxy.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
{ config, lib, pkgs, ... }:

with lib;

let

cfg = config.services.mtprotoproxy;

configOpts = {
PORT = cfg.port;
USERS = cfg.users;
SECURE_ONLY = cfg.secureOnly;
} // lib.optionalAttrs (cfg.adTag != null) { AD_TAG = cfg.adTag; }
// cfg.extraConfig;

convertOption = opt:
if isString opt || isInt opt then
builtins.toJSON opt
else if isBool opt then
if opt then "True" else "False"
else if isList opt then
"[" + concatMapStringsSep "," convertOption opt + "]"
else if isAttrs opt then
"{" + concatStringsSep "," (mapAttrsToList (name: opt: "${builtins.toJSON name}: ${convertOption opt}") opt) + "}"
else
throw "Invalid option type";

configFile = pkgs.writeText "config.py" (concatStringsSep "\n" (mapAttrsToList (name: opt: "${name} = ${convertOption opt}") configOpts));

in

{

###### interface

options = {

services.mtprotoproxy = {

enable = mkEnableOption "mtprotoproxy";

port = mkOption {
type = types.int;
default = 3256;
description = ''
TCP port to accept mtproto connections on.
'';
};

users = mkOption {
type = types.attrsOf types.str;
example = {
"tg" = "00000000000000000000000000000000";
"tg2" = "0123456789abcdef0123456789abcdef";
};
description = ''
Allowed users and their secrets. A secret is a 32 characters long hex string.
'';
};

secureOnly = mkOption {
type = types.bool;
default = true;
description = ''
Don't allow users to connect in non-secure mode (without random padding).
'';
};

adTag = mkOption {
type = types.nullOr types.str;
default = null;
# Taken from mtproxyproto's repo.
example = "3c09c680b76ee91a4c25ad51f742267d";
description = ''
Tag for advertising that can be obtained from @MTProxybot.
'';
};

extraConfig = mkOption {
type = types.attrs;
default = {};
example = {
"STATS_PRINT_PERIOD" = 600;
};
description = ''
Extra configuration options for mtprotoproxy.
'';
};

};

};


###### implementation

config = mkIf cfg.enable {

systemd.services.mtprotoproxy = {
description = "MTProto Proxy Daemon";
wantedBy = [ "multi-user.target" ];
serviceConfig = {
ExecStart = "${pkgs.mtprotoproxy}/bin/mtprotoproxy ${configFile}";
DynamicUser = true;
};
};

};

}
2 changes: 1 addition & 1 deletion nixos/modules/services/networking/wireguard.nix
Original file line number Diff line number Diff line change
@@ -244,7 +244,7 @@ let
description = "WireGuard Peer - ${interfaceName} - ${peer.publicKey}";
requires = [ "wireguard-${interfaceName}.service" ];
after = [ "wireguard-${interfaceName}.service" ];
wantedBy = [ "multi-user.target" ];
wantedBy = [ "multi-user.target" "wireguard-${interfaceName}.service" ];
environment.DEVICE = interfaceName;
environment.WG_ENDPOINT_RESOLUTION_RETRIES = "infinity";
path = with pkgs; [ iproute wireguard-tools ];
1 change: 1 addition & 0 deletions nixos/tests/all-tests.nix
Original file line number Diff line number Diff line change
@@ -248,6 +248,7 @@ in
transmission = handleTest ./transmission.nix {};
udisks2 = handleTest ./udisks2.nix {};
upnp = handleTest ./upnp.nix {};
uwsgi = handleTest ./uwsgi.nix {};
vault = handleTest ./vault.nix {};
virtualbox = handleTestOn ["x86_64-linux"] ./virtualbox.nix {};
wireguard = handleTest ./wireguard {};
6 changes: 6 additions & 0 deletions nixos/tests/docker-tools.nix
Original file line number Diff line number Diff line change
@@ -68,6 +68,12 @@ import ./make-test.nix ({ pkgs, ... }: {
$docker->succeed("docker load --input='${pkgs.dockerTools.examples.layered-on-top}'");
$docker->succeed("docker run --rm ${pkgs.dockerTools.examples.layered-on-top.imageName}");
# Ensure layers are shared between images
$docker->succeed("docker load --input='${pkgs.dockerTools.examples.another-layered-image}'");
$docker->succeed("docker inspect ${pkgs.dockerTools.examples.layered-image.imageName} | ${pkgs.jq}/bin/jq -r '.[] | .RootFS.Layers | .[]' | sort > layers1.sha256");
$docker->succeed("docker inspect ${pkgs.dockerTools.examples.another-layered-image.imageName} | ${pkgs.jq}/bin/jq -r '.[] | .RootFS.Layers | .[]' | sort > layers2.sha256");
$docker->succeed('[ $(comm -1 -2 layers1.sha256 layers2.sha256 | wc -l) -ne 0 ]');
# Ensure order of layers is correct
$docker->succeed("docker load --input='${pkgs.dockerTools.examples.layersOrder}'");
$docker->succeed("docker run --rm ${pkgs.dockerTools.examples.layersOrder.imageName} cat /tmp/layer1 | grep -q layer1");
Loading