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: 1bf18e4c852c
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: 3a393eecafb3
Choose a head ref
Loading
Showing with 1,294 additions and 586 deletions.
  1. +5 −0 maintainers/maintainer-list.nix
  2. +1 −1 nixos/modules/installer/tools/nixos-build-vms/build-vms.nix
  3. +2 −0 nixos/modules/misc/ids.nix
  4. +1 −0 nixos/modules/module-list.nix
  5. +2 −0 nixos/modules/profiles/hardened.nix
  6. +136 −0 nixos/modules/services/mail/rss2email.nix
  7. +51 −26 nixos/modules/services/monitoring/prometheus/alertmanager.nix
  8. +7 −0 nixos/modules/services/security/tor.nix
  9. +1 −0 nixos/tests/all-tests.nix
  10. +15 −0 nixos/tests/common/webroot/news-rss.xml
  11. +7 −0 nixos/tests/hardened.nix
  12. +22 −0 nixos/tests/prometheus.nix
  13. +66 −0 nixos/tests/rss2email.nix
  14. +3 −3 pkgs/applications/audio/a2jmidid/default.nix
  15. +3 −3 pkgs/applications/audio/synthv1/default.nix
  16. +1 −1 pkgs/applications/misc/llpp/default.nix
  17. +2 −2 pkgs/applications/misc/mako/default.nix
  18. +2 −2 pkgs/applications/misc/nnn/default.nix
  19. +7 −2 pkgs/applications/networking/feedreaders/rss2email/default.nix
  20. +2 −2 pkgs/applications/networking/mailreaders/realpine/default.nix
  21. +5 −6 pkgs/applications/office/kmymoney/default.nix
  22. +1 −1 pkgs/applications/science/chemistry/gwyddion/default.nix
  23. +1 −1 pkgs/applications/science/math/fricas/default.nix
  24. +1 −40 pkgs/applications/science/math/sage/README.md
  25. +73 −55 pkgs/applications/science/math/sage/default.nix
  26. +2 −0 pkgs/applications/science/math/sage/env-locations.nix
  27. +0 −17 pkgs/applications/science/math/sage/openblas-pc.nix
  28. +0 −16 pkgs/applications/science/math/sage/patches/eclib-20180710.patch
  29. +0 −98 pkgs/applications/science/math/sage/patches/eclib-regulator-precision.patch
  30. +0 −15 pkgs/applications/science/math/sage/patches/known-padics-bug.patch
  31. +0 −12 pkgs/applications/science/math/sage/patches/matplotlib-normed-deprecated.patch
  32. +17 −11 pkgs/applications/science/math/sage/sage-env.nix
  33. +22 −9 pkgs/applications/science/math/sage/sage-src.nix
  34. +51 −0 pkgs/applications/science/math/sage/sage-tests.nix
  35. +13 −11 pkgs/applications/science/math/sage/sage-with-env.nix
  36. +0 −41 pkgs/applications/science/math/sage/sage-wrapper.nix
  37. +31 −9 pkgs/applications/science/math/sage/sage.nix
  38. +14 −28 pkgs/applications/science/math/sage/sagedoc.nix
  39. +7 −9 pkgs/applications/science/math/sage/sagelib.nix
  40. +4 −1 pkgs/applications/science/math/sage/sagenb.nix
  41. +1 −1 pkgs/applications/science/misc/golly/beta.nix
  42. +1 −1 pkgs/applications/science/misc/golly/default.nix
  43. +1 −1 pkgs/applications/science/misc/golly/default.upstream
  44. +1 −1 pkgs/applications/version-management/git-and-tools/fast-export/default.nix
  45. +30 −0 pkgs/applications/video/pyca/default.nix
  46. +1 −1 pkgs/applications/window-managers/stalonetray/default.nix
  47. +2 −2 pkgs/data/fonts/inter-ui/default.nix
  48. +3 −3 pkgs/data/fonts/noto-fonts/default.nix
  49. +12 −15 pkgs/data/fonts/sarasa-gothic/default.nix
  50. +2 −2 pkgs/data/fonts/twemoji-color-font/default.nix
  51. +1 −1 pkgs/development/libraries/cyrus-sasl/default.nix
  52. +1 −1 pkgs/development/libraries/dssi/default.nix
  53. +1 −1 pkgs/development/libraries/libipfix/default.nix
  54. +2 −2 pkgs/development/libraries/libtar/default.nix
  55. +2 −2 pkgs/development/libraries/webkitgtk/2.22.nix
  56. +25 −0 pkgs/development/python-modules/nanoleaf/default.nix
  57. +3 −3 pkgs/development/python-modules/prettytable/default.nix
  58. +21 −0 pkgs/development/python-modules/sdnotify/default.nix
  59. +6 −2 pkgs/development/r-modules/wrapper-rstudio.nix
  60. +3 −4 pkgs/development/tools/minizinc/default.nix
  61. +3 −3 pkgs/development/tools/misc/hound/default.nix
  62. +6 −6 pkgs/development/tools/phantomjs2/default.nix
  63. +4 −4 pkgs/development/tools/skaffold/default.nix
  64. +2 −2 pkgs/games/blobby/default.nix
  65. +1 −1 pkgs/games/blobby/default.upstream
  66. +2 −2 pkgs/games/minetest/default.nix
  67. +1 −1 pkgs/games/steam/runtime-wrapped.nix
  68. +2 −2 pkgs/games/tennix/fix_FTBFS.patch
  69. +3 −3 pkgs/os-specific/linux/bridge-utils/default.nix
  70. +1 −1 pkgs/os-specific/linux/firejail/default.nix
  71. +1 −1 pkgs/os-specific/linux/firejail/default.upstream
  72. +2 −1 pkgs/os-specific/linux/iwd/default.nix
  73. +2 −2 pkgs/os-specific/linux/kernel/linux-4.14.nix
  74. +2 −2 pkgs/os-specific/linux/kernel/linux-4.19.nix
  75. +2 −2 pkgs/os-specific/linux/kernel/linux-4.9.nix
  76. +17 −13 pkgs/os-specific/linux/open-iscsi/default.nix
  77. +4 −0 pkgs/os-specific/linux/wpa_supplicant/default.nix
  78. +1 −1 pkgs/servers/home-assistant/component-packages.nix
  79. +3 −3 pkgs/servers/home-assistant/default.nix
  80. +36 −0 pkgs/servers/mail/system-sendmail/default.nix
  81. +2 −2 pkgs/servers/matrix-synapse/default.nix
  82. +7 −6 pkgs/shells/powershell/default.nix
  83. +25 −0 pkgs/tools/X11/imwheel/default.nix
  84. +4 −4 pkgs/tools/X11/xidlehook/default.nix
  85. +4 −0 pkgs/tools/admin/lxd/default.nix
  86. +29 −9 pkgs/tools/filesystems/lizardfs/default.nix
  87. +25 −0 pkgs/tools/filesystems/lizardfs/remove-download-external.patch
  88. +4 −7 pkgs/tools/filesystems/mtools/default.nix
  89. +0 −11 pkgs/tools/filesystems/mtools/fix-dos_to_wchar-declaration.patch
  90. +1 −1 pkgs/tools/filesystems/smbnetfs/default.nix
  91. +1 −1 pkgs/tools/filesystems/smbnetfs/default.upstream
  92. +64 −0 pkgs/tools/inputmethods/ibus-engines/ibus-table-chinese/default.nix
  93. +1 −0 pkgs/tools/inputmethods/ibus-engines/ibus-table/default.nix
  94. +2 −2 pkgs/tools/misc/direnv/default.nix
  95. +3 −3 pkgs/tools/misc/hyperfine/default.nix
  96. +2 −2 pkgs/tools/misc/yad/default.nix
  97. +43 −0 pkgs/tools/networking/ssh-agents/default.nix
  98. +2 −2 pkgs/tools/security/browserpass/default.nix
  99. +2 −2 pkgs/tools/security/nsjail/default.nix
  100. +2 −0 pkgs/tools/security/wpscan/Gemfile
  101. +55 −0 pkgs/tools/security/wpscan/Gemfile.lock
  102. +21 −0 pkgs/tools/security/wpscan/default.nix
  103. +164 −0 pkgs/tools/security/wpscan/gemset.nix
  104. +7 −7 pkgs/tools/system/dfc/default.nix
  105. +1 −1 pkgs/tools/system/ipmiutil/default.nix
  106. +1 −1 pkgs/tools/system/ipmiutil/default.upstream
  107. +2 −2 pkgs/tools/system/smartmontools/default.nix
  108. +24 −8 pkgs/top-level/all-packages.nix
  109. +4 −0 pkgs/top-level/python-packages.nix
5 changes: 5 additions & 0 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
@@ -1319,6 +1319,11 @@
github = "ellis";
name = "Ellis Whitehead";
};
elseym = {
email = "elseym@me.com";
github = "elseym";
name = "Simon Waibl";
};
elvishjerricco = {
email = "elvishjerricco@gmail.com";
github = "ElvishJerricco";
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ let nodes = import networkExpr; in

with import ../../../../lib/testing.nix {
inherit system;
pkgs = import ../.. { inherit system config; };
pkgs = import ../../../../.. { inherit system config; };
};

(makeTest { inherit nodes; testScript = ""; }).driver
2 changes: 2 additions & 0 deletions nixos/modules/misc/ids.nix
Original file line number Diff line number Diff line change
@@ -336,6 +336,7 @@
solr = 309;
alerta = 310;
minetest = 311;
rss2email = 312;

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

@@ -632,6 +633,7 @@
solr = 309;
alerta = 310;
minetest = 311;
rss2email = 312;

# When adding a gid, make sure it doesn't match an existing
# uid. Users and groups with the same name should have equal
1 change: 1 addition & 0 deletions nixos/modules/module-list.nix
Original file line number Diff line number Diff line change
@@ -330,6 +330,7 @@
./services/mail/postgrey.nix
./services/mail/spamassassin.nix
./services/mail/rspamd.nix
./services/mail/rss2email.nix
./services/mail/rmilter.nix
./services/mail/nullmailer.nix
./services/misc/airsonic.nix
2 changes: 2 additions & 0 deletions nixos/modules/profiles/hardened.nix
Original file line number Diff line number Diff line change
@@ -12,6 +12,8 @@ with lib;

boot.kernelPackages = mkDefault pkgs.linuxPackages_hardened;

nix.allowedUsers = mkDefault [ "@users" ];

security.hideProcessInformation = mkDefault true;

security.lockKernelModules = mkDefault true;
136 changes: 136 additions & 0 deletions nixos/modules/services/mail/rss2email.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
{ config, lib, pkgs, ... }:

with lib;

let
cfg = config.services.rss2email;
in {

###### interface

options = {

services.rss2email = {

enable = mkOption {
type = types.bool;
default = false;
description = "Whether to enable rss2email.";
};

to = mkOption {
type = types.str;
description = "Mail address to which to send emails";
};

interval = mkOption {
type = types.str;
default = "12h";
description = "How often to check the feeds, in systemd interval format";
};

config = mkOption {
type = with types; attrsOf (either str (either int bool));
default = {};
description = ''
The configuration to give rss2email.
Default will use system-wide <literal>sendmail</literal> to send the
email. This is rss2email's default when running
<literal>r2e new</literal>.
This set contains key-value associations that will be set in the
<literal>[DEFAULT]</literal> block along with the
<literal>to</literal> parameter.
See
<literal>https://github.com/rss2email/rss2email/blob/master/r2e.1</literal>
for more information on which parameters are accepted.
'';
};

feeds = mkOption {
description = "The feeds to watch.";
type = types.attrsOf (types.submodule {
options = {
url = mkOption {
type = types.str;
description = "The URL at which to fetch the feed.";
};

to = mkOption {
type = with types; nullOr str;
default = null;
description = ''
Email address to which to send feed items.
If <literal>null</literal>, this will not be set in the
configuration file, and rss2email will make it default to
<literal>rss2email.to</literal>.
'';
};
};
});
};
};

};


###### implementation

config = mkIf cfg.enable {
users.groups = {
rss2email.gid = config.ids.gids.rss2email;
};

users.users = {
rss2email = {
description = "rss2email user";
uid = config.ids.uids.rss2email;
group = "rss2email";
};
};

services.rss2email.config.to = cfg.to;

systemd.services.rss2email = let
conf = pkgs.writeText "rss2email.cfg" (lib.generators.toINI {} ({
DEFAULT = cfg.config;
} // lib.mapAttrs' (name: feed: nameValuePair "feed.${name}" (
{ inherit (feed) url; } //
lib.optionalAttrs (feed.to != null) { inherit (feed) to; }
)) cfg.feeds
));
in
{
preStart = ''
mkdir -p /var/rss2email
chmod 700 /var/rss2email
cp ${conf} /var/rss2email/conf.cfg
if [ ! -f /var/rss2email/db.json ]; then
echo '{"version":2,"feeds":[]}' > /var/rss2email/db.json
fi
chown -R rss2email:rss2email /var/rss2email
'';
path = [ pkgs.system-sendmail ];
serviceConfig = {
ExecStart =
"${pkgs.rss2email}/bin/r2e -c /var/rss2email/conf.cfg -d /var/rss2email/db.json run";
User = "rss2email";
PermissionsStartOnly = "true";
};
};

systemd.timers.rss2email = {
partOf = [ "rss2email.service" ];
wantedBy = [ "timers.target" ];
timerConfig.OnBootSec = "0";
timerConfig.OnUnitActiveSec = cfg.interval;
};
};

meta.maintainers = with lib.maintainers; [ ekleog ];
}
77 changes: 51 additions & 26 deletions nixos/modules/services/monitoring/prometheus/alertmanager.nix
Original file line number Diff line number Diff line change
@@ -5,10 +5,18 @@ with lib;
let
cfg = config.services.prometheus.alertmanager;
mkConfigFile = pkgs.writeText "alertmanager.yml" (builtins.toJSON cfg.configuration);
alertmanagerYml =
if cfg.configText != null then
pkgs.writeText "alertmanager.yml" cfg.configText
else mkConfigFile;

checkedConfig = file: pkgs.runCommand "checked-config" { buildInputs = [ cfg.package ]; } ''
ln -s ${file} $out
amtool check-config $out
'';

alertmanagerYml = let
yml = if cfg.configText != null then
pkgs.writeText "alertmanager.yml" cfg.configText
else mkConfigFile;
in checkedConfig yml;

cmdlineArgs = cfg.extraFlags ++ [
"--config.file ${alertmanagerYml}"
"--web.listen-address ${cfg.listenAddress}:${toString cfg.port}"
@@ -23,6 +31,15 @@ in {
services.prometheus.alertmanager = {
enable = mkEnableOption "Prometheus Alertmanager";

package = mkOption {
type = types.package;
default = pkgs.prometheus-alertmanager;
defaultText = "pkgs.alertmanager";
description = ''
Package that should be used for alertmanager.
'';
};

user = mkOption {
type = types.str;
default = "nobody";
@@ -40,8 +57,8 @@ in {
};

configuration = mkOption {
type = types.attrs;
default = {};
type = types.nullOr types.attrs;
default = null;
description = ''
Alertmanager configuration as nix attribute set.
'';
@@ -119,26 +136,34 @@ in {
};
};

config = mkMerge [
(mkIf cfg.enable {
assertions = singleton {
assertion = cfg.configuration != null || cfg.configText != null;
message = "Can not enable alertmanager without a configuration. "
+ "Set either the `configuration` or `configText` attribute.";
};
})
(mkIf cfg.enable {
networking.firewall.allowedTCPPorts = optional cfg.openFirewall cfg.port;

systemd.services.alertmanager = {
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
script = ''
${cfg.package}/bin/alertmanager \
${concatStringsSep " \\\n " cmdlineArgs}
'';

config = mkIf cfg.enable {
networking.firewall.allowedTCPPorts = optional cfg.openFirewall cfg.port;

systemd.services.alertmanager = {
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
script = ''
${pkgs.prometheus-alertmanager.bin}/bin/alertmanager \
${concatStringsSep " \\\n " cmdlineArgs}
'';

serviceConfig = {
User = cfg.user;
Group = cfg.group;
Restart = "always";
PrivateTmp = true;
WorkingDirectory = "/tmp";
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
serviceConfig = {
User = cfg.user;
Group = cfg.group;
Restart = "always";
PrivateTmp = true;
WorkingDirectory = "/tmp";
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
};
};
};
};
})
];
}
7 changes: 7 additions & 0 deletions nixos/modules/services/security/tor.nix
Original file line number Diff line number Diff line change
@@ -92,6 +92,7 @@ let
# Hidden services
+ concatStrings (flip mapAttrsToList cfg.hiddenServices (n: v: ''
HiddenServiceDir ${torDirectory}/onion/${v.name}
${optionalString (v.version != null) "HiddenServiceVersion ${toString v.version}"}
${flip concatMapStrings v.map (p: ''
HiddenServicePort ${toString p.port} ${p.destination}
'')}
@@ -667,6 +668,12 @@ in
};
}));
};

version = mkOption {
default = null;
description = "Rendezvous service descriptor version to publish for the hidden service. Currently, versions 2 and 3 are supported. (Default: 2)";
type = types.nullOr (types.enum [ 2 3 ]);
};
};

config = {
1 change: 1 addition & 0 deletions nixos/tests/all-tests.nix
Original file line number Diff line number Diff line change
@@ -179,6 +179,7 @@ in
radicale = handleTest ./radicale.nix {};
redmine = handleTest ./redmine.nix {};
rspamd = handleTest ./rspamd.nix {};
rss2email = handleTest ./rss2email.nix {};
rsyslogd = handleTest ./rsyslogd.nix {};
runInMachine = handleTest ./run-in-machine.nix {};
rxe = handleTest ./rxe.nix {};
15 changes: 15 additions & 0 deletions nixos/tests/common/webroot/news-rss.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:blogChannel="http://backend.userland.com/blogChannelModule" version="2.0"><channel><title>NixOS News</title><link>https://nixos.org</link><description>News for NixOS, the purely functional Linux distribution.</description><image><title>NixOS</title><url>https://nixos.org/logo/nixos-logo-only-hires.png</url><link>https://nixos.org/</link></image><item><title>
NixOS 18.09 released
</title><link>https://nixos.org/news.html</link><description>
<a href="https://github.com/NixOS/nixos-artwork/blob/master/releases/18.09-jellyfish/jellyfish.png">
<img class="inline" src="logo/nixos-logo-18.09-jellyfish-lores.png" alt="18.09 Jellyfish logo" with="100" height="87"/>
</a>
NixOS 18.09 “Jellyfish” has been released, the tenth stable release branch.
See the <a href="/nixos/manual/release-notes.html#sec-release-18.09">release notes</a>
for details. You can get NixOS 18.09 ISOs and VirtualBox appliances
from the <a href="nixos/download.html">download page</a>.
For information on how to upgrade from older release branches
to 18.09, check out the
<a href="/nixos/manual/index.html#sec-upgrading">manual section on upgrading</a>.
</description><pubDate>Sat Oct 06 2018 00:00:00 GMT</pubDate></item></channel></rss>
7 changes: 7 additions & 0 deletions nixos/tests/hardened.nix
Original file line number Diff line number Diff line change
@@ -10,6 +10,7 @@ import ./make-test.nix ({ pkgs, ...} : {
{ users.users.alice = { isNormalUser = true; extraGroups = [ "proc" ]; };
users.users.sybil = { isNormalUser = true; group = "wheel"; };
imports = [ ../modules/profiles/hardened.nix ];
nix.useSandbox = false;
virtualisation.emptyDiskImages = [ 4096 ];
boot.initrd.postDeviceCommands = ''
${pkgs.dosfstools}/bin/mkfs.vfat -n EFISYS /dev/vdb
@@ -63,5 +64,11 @@ import ./make-test.nix ({ pkgs, ...} : {
$machine->succeed("mount /dev/disk/by-label/EFISYS /efi");
$machine->succeed("mountpoint -q /efi"); # now mounted
};
# Test Nix dæmon usage
subtest "nix-daemon", sub {
$machine->fail("su -l nobody -s /bin/sh -c 'nix ping-store'");
$machine->succeed("su -l alice -c 'nix ping-store'") =~ "OK";
};
'';
})
22 changes: 22 additions & 0 deletions nixos/tests/prometheus.nix
Original file line number Diff line number Diff line change
@@ -13,6 +13,25 @@ import ./make-test.nix {
}];
}];
rules = [ ''testrule = count(up{job="prometheus"})'' ];

# a very simple version of the alertmanager configuration just to see if
# configuration checks & service startup are working
alertmanager = {
enable = true;
listenAddress = "[::1]";
port = 9093;
configuration = {
route.receiver = "webhook";
receivers = [
{
name = "webhook";
webhook_configs = [
{ url = "http://localhost"; }
];
}
];
};
};
};
};
};
@@ -22,5 +41,8 @@ import ./make-test.nix {
$one->waitForUnit("prometheus.service");
$one->waitForOpenPort(9090);
$one->succeed("curl -s http://127.0.0.1:9090/metrics");
$one->waitForUnit("alertmanager.service");
$one->waitForOpenPort("9093");
$one->succeed("curl -f -s http://localhost:9093/");
'';
}
Loading