Merge master into staging-next

This commit is contained in:
github-actions[bot]
2021-05-14 00:58:11 +00:00
committed by GitHub
89 changed files with 2361 additions and 2905 deletions
+3
View File
@@ -37,6 +37,9 @@ in
# drives.
"uas"
# SD cards.
"sdhci_pci"
# Firewire support. Not tested.
"ohci1394" "sbp2"
+6 -2
View File
@@ -31,6 +31,7 @@ let
extraOptions = cfg.extraOptions;
withBaseWrapper = cfg.wrapperFeatures.base;
withGtkWrapper = cfg.wrapperFeatures.gtk;
isNixOS = true;
};
in {
options.programs.sway = {
@@ -120,8 +121,11 @@ in {
systemPackages = [ swayPackage ] ++ cfg.extraPackages;
etc = {
"sway/config".source = mkOptionDefault "${swayPackage}/etc/sway/config";
#"sway/security.d".source = mkOptionDefault "${swayPackage}/etc/sway/security.d/";
#"sway/config.d".source = mkOptionDefault "${swayPackage}/etc/sway/config.d/";
"sway/config.d/nixos.conf".source = pkgs.writeText "nixos.conf" ''
# Import the most important environment variables into the D-Bus and systemd
# user environments (e.g. required for screen sharing and Pinentry prompts):
exec dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK
'';
};
};
security.pam.services.swaylock = {};
@@ -41,12 +41,12 @@ in
serviceConfig = {
ExecStart = ''
${pkgs.prometheus-bind-exporter}/bin/bind_exporter \
-web.listen-address ${cfg.listenAddress}:${toString cfg.port} \
-bind.pid-file /var/run/named/named.pid \
-bind.timeout ${toString cfg.bindTimeout} \
-bind.stats-url ${cfg.bindURI} \
-bind.stats-version ${cfg.bindVersion} \
-bind.stats-groups ${concatStringsSep "," cfg.bindGroups} \
--web.listen-address ${cfg.listenAddress}:${toString cfg.port} \
--bind.pid-file /var/run/named/named.pid \
--bind.timeout ${toString cfg.bindTimeout} \
--bind.stats-url ${cfg.bindURI} \
--bind.stats-version ${cfg.bindVersion} \
--bind.stats-groups ${concatStringsSep "," cfg.bindGroups} \
${concatStringsSep " \\\n " cfg.extraFlags}
'';
};
@@ -41,11 +41,11 @@ in
};
logFormat = mkOption {
type = types.str;
default = "logger:stderr";
example = "logger:syslog?appname=bob&local=7 or logger:stdout?json=true";
type = types.enum [ "logfmt" "json" ];
default = "logfmt";
example = "json";
description = ''
Set the log target and format.
Set the log format.
'';
};
@@ -59,16 +59,16 @@ in
};
serviceOpts = let
collectSettingsArgs = if (cfg.collectdBinary.enable) then ''
-collectd.listen-address ${cfg.collectdBinary.listenAddress}:${toString cfg.collectdBinary.port} \
-collectd.security-level ${cfg.collectdBinary.securityLevel} \
--collectd.listen-address ${cfg.collectdBinary.listenAddress}:${toString cfg.collectdBinary.port} \
--collectd.security-level ${cfg.collectdBinary.securityLevel} \
'' else "";
in {
serviceConfig = {
ExecStart = ''
${pkgs.prometheus-collectd-exporter}/bin/collectd_exporter \
-log.format ${escapeShellArg cfg.logFormat} \
-log.level ${cfg.logLevel} \
-web.listen-address ${cfg.listenAddress}:${toString cfg.port} \
--log.format ${escapeShellArg cfg.logFormat} \
--log.level ${cfg.logLevel} \
--web.listen-address ${cfg.listenAddress}:${toString cfg.port} \
${collectSettingsArgs} \
${concatStringsSep " \\\n " cfg.extraFlags}
'';
@@ -13,7 +13,7 @@ let
generateConfig = extraLabels: {
metrics = (map (path: {
name = "rspamd_${replaceStrings [ "." " " ] [ "_" "_" ] path}";
path = "$.${path}";
path = "{ .${path} }";
labels = extraLabels;
}) [
"actions.'add header'"
+1
View File
@@ -103,6 +103,7 @@ in
readOnly = true;
type = types.package;
default = if config.boot.zfs.enableUnstable then pkgs.zfsUnstable else pkgs.zfs;
defaultText = "if config.boot.zfs.enableUnstable then pkgs.zfsUnstable else pkgs.zfs";
description = "Configured ZFS userland tools package.";
};
+4 -4
View File
@@ -302,7 +302,7 @@ let
url = "http://localhost";
configFile = pkgs.writeText "json-exporter-conf.json" (builtins.toJSON {
metrics = [
{ name = "json_test_metric"; path = "$.test"; }
{ name = "json_test_metric"; path = "{ .test }"; }
];
});
};
@@ -406,8 +406,8 @@ let
};
metricProvider = {
systemd.services.prometheus-lnd-exporter.serviceConfig.DynamicUser = false;
services.bitcoind.enable = true;
services.bitcoind.extraConfig = ''
services.bitcoind.main.enable = true;
services.bitcoind.main.extraConfig = ''
rpcauth=bitcoinrpc:e8fe33f797e698ac258c16c8d7aadfbe$872bdb8f4d787367c26bcfd75e6c23c4f19d44a69f5d1ad329e5adf3f82710f7
bitcoind.zmqpubrawblock=tcp://127.0.0.1:28332
bitcoind.zmqpubrawtx=tcp://127.0.0.1:28333
@@ -1021,7 +1021,7 @@ let
# Note: this does not connect the test environment to the Tor network.
# Client, relay, bridge or exit connectivity are disabled by default.
services.tor.enable = true;
services.tor.controlPort = 9051;
services.tor.settings.ControlPort = 9051;
};
exporterTest = ''
wait_for_unit("tor.service")
+14 -2
View File
@@ -3,7 +3,7 @@ import ./make-test-python.nix ({ pkgs, ...} :
{
name = "signal-desktop";
meta = with pkgs.lib.maintainers; {
maintainers = [ flokli ];
maintainers = [ flokli primeos ];
};
machine = { ... }:
@@ -16,7 +16,7 @@ import ./make-test-python.nix ({ pkgs, ...} :
services.xserver.enable = true;
test-support.displayManager.auto.user = "alice";
environment.systemPackages = [ pkgs.signal-desktop ];
environment.systemPackages = with pkgs; [ signal-desktop file ];
virtualisation.memorySize = 1024;
};
@@ -39,5 +39,17 @@ import ./make-test-python.nix ({ pkgs, ...} :
machine.wait_for_text("Signal")
machine.wait_for_text("File Edit View Window Help")
machine.screenshot("signal_desktop")
# Test if the database is encrypted to prevent these issues:
# - https://github.com/NixOS/nixpkgs/issues/108772
# - https://github.com/NixOS/nixpkgs/pull/117555
print(machine.succeed("su - alice -c 'file ~/.config/Signal/sql/db.sqlite'"))
# TODO: The DB should be encrypted and the following should be machine.fail
# instead of machine.succeed but the DB is currently unencrypted and we
# want to notice if this isn't the case anymore as the transition to a
# encrypted DB can cause data loss!:
machine.succeed(
"su - alice -c 'file ~/.config/Signal/sql/db.sqlite' | grep -i sqlite"
)
'';
})