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: 984851a9bfa3
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: 8746c77a383f
Choose a head ref
Loading
Showing with 1,386 additions and 539 deletions.
  1. +10 −0 nixos/doc/manual/development/releases.xml
  2. +35 −0 nixos/modules/config/{timezone.nix → locale.nix}
  3. +2 −1 nixos/modules/module-list.nix
  4. +18 −0 nixos/modules/rename.nix
  5. +1 −1 nixos/modules/services/misc/gitlab.nix
  6. +4 −4 nixos/modules/services/monitoring/datadog-agent.nix
  7. +17 −9 nixos/modules/services/monitoring/prometheus/default.nix
  8. +8 −1 nixos/modules/services/monitoring/prometheus/exporters/blackbox.nix
  9. +115 −0 nixos/modules/services/x11/clight.nix
  10. +8 −50 nixos/modules/services/x11/redshift.nix
  11. +4 −4 pkgs/applications/altcoins/dogecoin.nix
  12. +2 −2 pkgs/applications/audio/musescore/default.nix
  13. +4 −2 pkgs/applications/audio/x42-plugins/default.nix
  14. +41 −14 pkgs/applications/editors/aseprite/default.nix
  15. +23 −0 pkgs/applications/editors/aseprite/skia-deps.nix
  16. +37 −0 pkgs/applications/editors/aseprite/skia-make-deps.sh
  17. +68 −0 pkgs/applications/editors/aseprite/skia.nix
  18. +2 −2 pkgs/applications/editors/netbeans/default.nix
  19. +17 −17 pkgs/applications/misc/calibre/default.nix
  20. +75 −0 pkgs/applications/misc/clight/clightd.nix
  21. +57 −0 pkgs/applications/misc/clight/default.nix
  22. +5 −8 pkgs/applications/networking/instant-messengers/teamspeak/server.nix
  23. +28 −0 pkgs/applications/networking/mailreaders/mlarchive2maildir/default.nix
  24. +7 −7 pkgs/applications/version-management/subversion/default.nix
  25. +7 −7 pkgs/desktops/gnome-3/core/evolution-data-server/default.nix
  26. +515 −25 pkgs/desktops/gnome-3/core/evolution-data-server/hardcode-gsettings.patch
  27. +3 −3 pkgs/development/compilers/dotnet/sdk/default.nix
  28. +2 −2 pkgs/development/compilers/ponyc/default.nix
  29. +3 −3 pkgs/development/compilers/qbe/default.nix
  30. +3 −3 pkgs/development/libraries/fcppt/default.nix
  31. +5 −6 pkgs/development/libraries/itk/default.nix
  32. +0 −1 pkgs/development/libraries/libimobiledevice/default.nix
  33. +54 −0 pkgs/development/libraries/libirecovery/default.nix
  34. +29 −0 pkgs/development/libraries/libmodule/default.nix
  35. +17 −8 pkgs/development/libraries/librelp/default.nix
  36. +10 −4 pkgs/development/libraries/nuspell/default.nix
  37. +2 −2 pkgs/development/libraries/physics/apfel/default.nix
  38. +17 −0 pkgs/development/libraries/zlib/default.nix
  39. +3 −3 pkgs/development/tools/ocaml/camlp5/default.nix
  40. +7 −21 pkgs/games/azimuth/default.nix
  41. +19 −5 pkgs/games/opendune/default.nix
  42. +2 −2 pkgs/misc/seafile-shared/default.nix
  43. +6 −4 pkgs/servers/monitoring/prometheus/blackbox-exporter.nix
  44. +7 −9 pkgs/servers/monitoring/prometheus/varnish-exporter.nix
  45. +0 −300 pkgs/servers/monitoring/prometheus/varnish-exporter_deps.nix
  46. +2 −2 pkgs/tools/filesystems/moosefs/default.nix
  47. +58 −0 pkgs/tools/misc/idevicerestore/default.nix
  48. +3 −1 pkgs/tools/misc/tmpwatch/default.nix
  49. +1 −2 pkgs/tools/networking/dd-agent/datadog-agent.nix
  50. +3 −0 pkgs/tools/security/fail2ban/default.nix
  51. +20 −4 pkgs/top-level/all-packages.nix
10 changes: 10 additions & 0 deletions nixos/doc/manual/development/releases.xml
Original file line number Diff line number Diff line change
@@ -98,6 +98,16 @@
<literal>stableBranch</literal> set to false.
</para>
</listitem>
<listitem>
<para>
Remove attributes that we know we will not be able to support,
especially if there is a stable alternative. E.g. Check that our
Linux kernels'
<link xlink:href="https://www.kernel.org/category/releases.html">
projected end-of-life</link> are after our release projected
end-of-life
</para>
</listitem>
<listitem>
<para>
Edit changelog at
Original file line number Diff line number Diff line change
@@ -9,6 +9,8 @@ let
timezone = types.nullOr (types.addCheck types.str nospace)
// { description = "null or string without spaces"; };

lcfg = config.location;

in

{
@@ -37,12 +39,45 @@ in
};

};

location = {

latitude = mkOption {
type = types.float;
description = ''
Your current latitude, between
<literal>-90.0</literal> and <literal>90.0</literal>. Must be provided
along with longitude.
'';
};

longitude = mkOption {
type = types.float;
description = ''
Your current longitude, between
between <literal>-180.0</literal> and <literal>180.0</literal>. Must be
provided along with latitude.
'';
};

provider = mkOption {
type = types.enum [ "manual" "geoclue2" ];
default = "manual";
description = ''
The location provider to use for determining your location. If set to
<literal>manual</literal> you must also provide latitude/longitude.
'';
};

};
};

config = {

environment.sessionVariables.TZDIR = "/etc/zoneinfo";

services.geoclue2.enable = mkIf (lcfg.provider == "geoclue2") true;

# This way services are restarted when tzdata changes.
systemd.globalEnvironment.TZDIR = tzdir;

3 changes: 2 additions & 1 deletion nixos/modules/module-list.nix
Original file line number Diff line number Diff line change
@@ -20,6 +20,7 @@
./config/iproute2.nix
./config/krb5/default.nix
./config/ldap.nix
./config/locale.nix
./config/malloc.nix
./config/networking.nix
./config/no-x-libs.nix
@@ -33,7 +34,6 @@
./config/system-environment.nix
./config/system-path.nix
./config/terminfo.nix
./config/timezone.nix
./config/unix-odbc-drivers.nix
./config/users-groups.nix
./config/vpnc.nix
@@ -820,6 +820,7 @@
./services/web-servers/varnish/default.nix
./services/web-servers/zope2.nix
./services/x11/extra-layouts.nix
./services/x11/clight.nix
./services/x11/colord.nix
./services/x11/compton.nix
./services/x11/unclutter.nix
18 changes: 18 additions & 0 deletions nixos/modules/rename.nix
Original file line number Diff line number Diff line change
@@ -51,6 +51,10 @@ with lib;
(mkRemovedOptionModule [ "services" "misc" "nzbget" "openFirewall" ] "The port used by nzbget is managed through the web interface so you should adjust your firewall rules accordingly.")
(mkRemovedOptionModule [ "services" "prometheus" "alertmanager" "user" ] "The alertmanager service is now using systemd's DynamicUser mechanism which obviates a user setting.")
(mkRemovedOptionModule [ "services" "prometheus" "alertmanager" "group" ] "The alertmanager service is now using systemd's DynamicUser mechanism which obviates a group setting.")
(mkRemovedOptionModule [ "services" "prometheus2" "alertmanagerURL" ] ''
Due to incompatibility, the alertmanagerURL option has been removed,
please use 'services.prometheus2.alertmanagers' instead.
'')
(mkRenamedOptionModule [ "services" "tor" "relay" "portSpec" ] [ "services" "tor" "relay" "port" ])
(mkRenamedOptionModule [ "services" "vmwareGuest" ] [ "virtualisation" "vmware" "guest" ])
(mkRenamedOptionModule [ "jobs" ] [ "systemd" "services" ])
@@ -257,6 +261,20 @@ with lib;
(mkRenamedOptionModule [ "networking" "extraResolvconfConf" ] [ "networking" "resolvconf" "extraConfig" ])
(mkRenamedOptionModule [ "networking" "resolvconfOptions" ] [ "networking" "resolvconf" "extraOptions" ])

# Redshift
(mkChangedOptionModule [ "services" "redshift" "latitude" ] [ "location" "latitude" ]
(config:
let value = getAttrFromPath [ "services" "redshift" "latitude" ] config;
in if value == null then
throw "services.redshift.latitude is set to null, you can remove this"
else builtins.fromJSON value))
(mkChangedOptionModule [ "services" "redshift" "longitude" ] [ "location" "longitude" ]
(config:
let value = getAttrFromPath [ "services" "redshift" "longitude" ] config;
in if value == null then
throw "services.redshift.longitude is set to null, you can remove this"
else builtins.fromJSON value))

] ++ (flip map [ "blackboxExporter" "collectdExporter" "fritzboxExporter"
"jsonExporter" "minioExporter" "nginxExporter" "nodeExporter"
"snmpExporter" "unifiExporter" "varnishExporter" ]
2 changes: 1 addition & 1 deletion nixos/modules/services/misc/gitlab.nix
Original file line number Diff line number Diff line change
@@ -502,7 +502,7 @@ in {
"d ${cfg.statePath} 0750 ${cfg.user} ${cfg.group} -"
"d ${cfg.statePath}/builds 0750 ${cfg.user} ${cfg.group} -"
"d ${cfg.statePath}/config 0750 ${cfg.user} ${cfg.group} -"
"d ${cfg.statePath}/config/initializers 0750 ${cfg.user} ${cfg.group} -"
"D ${cfg.statePath}/config/initializers 0750 ${cfg.user} ${cfg.group} -"
"d ${cfg.statePath}/db 0750 ${cfg.user} ${cfg.group} -"
"d ${cfg.statePath}/log 0750 ${cfg.user} ${cfg.group} -"
"d ${cfg.statePath}/repositories 2770 ${cfg.user} ${cfg.group} -"
8 changes: 4 additions & 4 deletions nixos/modules/services/monitoring/datadog-agent.nix
Original file line number Diff line number Diff line change
@@ -42,9 +42,9 @@ let
# Apply the configured extraIntegrations to the provided agent
# package. See the documentation of `dd-agent/integrations-core.nix`
# for detailed information on this.
datadogPkg = cfg.package.overrideAttrs(_: {
python = (pkgs.datadog-integrations-core cfg.extraIntegrations).python;
});
datadogPkg = cfg.package.override {
pythonPackages = pkgs.datadog-integrations-core cfg.extraIntegrations;
};
in {
options.services.datadog-agent = {
enable = mkOption {
@@ -60,7 +60,7 @@ in {
defaultText = "pkgs.datadog-agent";
description = ''
Which DataDog v6 agent package to use. Note that the provided
package is expected to have an overridable `python`-attribute
package is expected to have an overridable `pythonPackages`-attribute
which configures the Python environment with the Datadog
checks.
'';
26 changes: 17 additions & 9 deletions nixos/modules/services/monitoring/prometheus/default.nix
Original file line number Diff line number Diff line change
@@ -79,12 +79,8 @@ let
(pkgs.writeText "prometheus.rules" (concatStringsSep "\n" cfg2.rules))
]);
scrape_configs = filterValidPrometheus cfg2.scrapeConfigs;
alerting = optionalAttrs (cfg2.alertmanagerURL != []) {
alertmanagers = [{
static_configs = [{
targets = cfg2.alertmanagerURL;
}];
}];
alerting = {
inherit (cfg2) alertmanagers;
};
};

@@ -738,11 +734,23 @@ in {
'';
};

alertmanagerURL = mkOption {
type = types.listOf types.str;
alertmanagers = mkOption {
type = types.listOf types.attrs;
example = literalExample ''
[ {
scheme = "https";
path_prefix = "/alertmanager";
static_configs = [ {
targets = [
"prometheus.domain.tld"
];
} ];
} ]
'';
default = [];
description = ''
List of Alertmanager URLs to send notifications to.
A list of alertmanagers to send alerts to.
See <link xlink:href="https://prometheus.io/docs/prometheus/latest/configuration/configuration/#alertmanager_config">the official documentation</link> for more information.
'';
};

Original file line number Diff line number Diff line change
@@ -4,6 +4,13 @@ with lib;

let
cfg = config.services.prometheus.exporters.blackbox;

checkConfig = file: pkgs.runCommand "checked-blackbox-exporter.conf" {
preferLocalBuild = true;
buildInputs = [ pkgs.buildPackages.prometheus-blackbox-exporter ]; } ''
ln -s ${file} $out
blackbox_exporter --config.check --config.file $out
'';
in
{
port = 9115;
@@ -21,7 +28,7 @@ in
ExecStart = ''
${pkgs.prometheus-blackbox-exporter}/bin/blackbox_exporter \
--web.listen-address ${cfg.listenAddress}:${toString cfg.port} \
--config.file ${cfg.configFile} \
--config.file ${checkConfig cfg.configFile} \
${concatStringsSep " \\\n " cfg.extraFlags}
'';
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
115 changes: 115 additions & 0 deletions nixos/modules/services/x11/clight.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
{ config, pkgs, lib, ... }:

with lib;

let
cfg = config.services.clight;

toConf = v:
if builtins.isFloat v then toString v
else if isInt v then toString v
else if isBool v then boolToString v
else if isString v then ''"${escape [''"''] v}"''
else if isList v then "[ " + concatMapStringsSep ", " toConf v + " ]"
else abort "clight.toConf: unexpected type (v = ${v})";

clightConf = pkgs.writeText "clight.conf"
(concatStringsSep "\n" (mapAttrsToList
(name: value: "${toString name} = ${toConf value};")
(filterAttrs
(_: value: value != null)
cfg.settings)));
in {
options.services.clight = {
enable = mkOption {
type = types.bool;
default = false;
description = ''
Whether to enable clight or not.
'';
};

temperature = {
day = mkOption {
type = types.int;
default = 5500;
description = ''
Colour temperature to use during the day, between
<literal>1000</literal> and <literal>25000</literal> K.
'';
};
night = mkOption {
type = types.int;
default = 3700;
description = ''
Colour temperature to use at night, between
<literal>1000</literal> and <literal>25000</literal> K.
'';
};
};

settings = let
validConfigTypes = with types; either int (either str (either bool float));
in mkOption {
type = with types; attrsOf (nullOr (either validConfigTypes (listOf validConfigTypes)));
default = {};
example = { captures = 20; gamma_long_transition = true; ac_capture_timeouts = [ 120 300 60 ]; };
description = ''
Additional configuration to extend clight.conf. See
<link xlink:href="https://github.com/FedeDP/Clight/blob/master/Extra/clight.conf"/> for a
sample configuration file.
'';
};
};

config = mkIf cfg.enable {
boot.kernelModules = [ "i2c_dev" ];
environment.systemPackages = with pkgs; [ clight clightd ];
services.dbus.packages = with pkgs; [ clight clightd ];
services.upower.enable = true;

services.clight.settings = {
gamma_temp = with cfg.temperature; mkDefault [ day night ];
} // (optionalAttrs (config.location.provider == "manual") {
latitude = mkDefault config.location.latitude;
longitude = mkDefault config.location.longitude;
});

services.geoclue2.appConfig."clightc" = {
isAllowed = true;
isSystem = true;
};

systemd.services.clightd = {
requires = [ "polkit.service" ];
wantedBy = [ "multi-user.target" ];

description = "Bus service to manage various screen related properties (gamma, dpms, backlight)";
serviceConfig = {
Type = "dbus";
BusName = "org.clightd.clightd";
Restart = "on-failure";
RestartSec = 5;
ExecStart = ''
${pkgs.clightd}/bin/clightd
'';
};
};

systemd.user.services.clight = {
after = [ "upower.service" "clightd.service" ];
wants = [ "upower.service" "clightd.service" ];
partOf = [ "graphical-session.target" ];
wantedBy = [ "graphical-session.target" ];

description = "C daemon to adjust screen brightness to match ambient brightness, as computed capturing frames from webcam";
serviceConfig = {
Restart = "on-failure";
RestartSec = 5;
ExecStart = ''
${pkgs.clight}/bin/clight --conf-file ${clightConf}
'';
};
};
};
}
Loading