mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-12 05:16:25 +03:00
Merge staging-next into staging
This commit is contained in:
commit
fade30f7b2
72 changed files with 1246 additions and 621 deletions
|
@ -8,7 +8,7 @@
|
|||
},
|
||||
"context.modules": [
|
||||
{
|
||||
"name": "libpipewire-module-rtkit",
|
||||
"name": "libpipewire-module-rt",
|
||||
"args": {},
|
||||
"flags": [
|
||||
"ifexists",
|
||||
|
|
|
@ -0,0 +1,118 @@
|
|||
{
|
||||
"context.properties": {
|
||||
"link.max-buffers": 16,
|
||||
"core.daemon": true,
|
||||
"core.name": "pipewire-0",
|
||||
"settings.check-quantum": true,
|
||||
"settings.check-rate": true,
|
||||
"vm.overrides": {
|
||||
"default.clock.min-quantum": 1024
|
||||
}
|
||||
},
|
||||
"context.spa-libs": {
|
||||
"audio.convert.*": "audioconvert/libspa-audioconvert",
|
||||
"api.alsa.*": "alsa/libspa-alsa",
|
||||
"support.*": "support/libspa-support"
|
||||
},
|
||||
"context.modules": [
|
||||
{
|
||||
"name": "libpipewire-module-rt",
|
||||
"args": {
|
||||
"nice.level": -11
|
||||
},
|
||||
"flags": [
|
||||
"ifexists",
|
||||
"nofail"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-protocol-native"
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-profiler"
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-metadata"
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-spa-node-factory"
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-client-node"
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-access",
|
||||
"args": {}
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-adapter"
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-link-factory"
|
||||
}
|
||||
],
|
||||
"context.objects": [
|
||||
{
|
||||
"factory": "metadata",
|
||||
"args": {
|
||||
"metadata.name": "default"
|
||||
}
|
||||
},
|
||||
{
|
||||
"factory": "spa-node-factory",
|
||||
"args": {
|
||||
"factory.name": "support.node.driver",
|
||||
"node.name": "Dummy-Driver",
|
||||
"node.group": "pipewire.dummy",
|
||||
"priority.driver": 20000
|
||||
}
|
||||
},
|
||||
{
|
||||
"factory": "spa-node-factory",
|
||||
"args": {
|
||||
"factory.name": "support.node.driver",
|
||||
"node.name": "Freewheel-Driver",
|
||||
"priority.driver": 19000,
|
||||
"node.group": "pipewire.freewheel",
|
||||
"node.freewheel": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"factory": "adapter",
|
||||
"args": {
|
||||
"factory.name": "api.alsa.pcm.source",
|
||||
"node.name": "system",
|
||||
"node.description": "system",
|
||||
"media.class": "Audio/Source",
|
||||
"api.alsa.path": "hw:0",
|
||||
"node.suspend-on-idle": true,
|
||||
"resample.disable": true,
|
||||
"channelmix.disable": true,
|
||||
"adapter.auto-port-config": {
|
||||
"mode": "dsp",
|
||||
"monitor": false,
|
||||
"position": "unknown"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"factory": "adapter",
|
||||
"args": {
|
||||
"factory.name": "api.alsa.pcm.sink",
|
||||
"node.name": "system",
|
||||
"node.description": "system",
|
||||
"media.class": "Audio/Sink",
|
||||
"api.alsa.path": "hw:0",
|
||||
"node.suspend-on-idle": true,
|
||||
"resample.disable": true,
|
||||
"channelmix.disable": true,
|
||||
"adapter.auto-port-config": {
|
||||
"mode": "dsp",
|
||||
"monitor": false,
|
||||
"position": "unknown"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"context.exec": []
|
||||
}
|
|
@ -6,8 +6,10 @@
|
|||
},
|
||||
"context.modules": [
|
||||
{
|
||||
"name": "libpipewire-module-rtkit",
|
||||
"args": {},
|
||||
"name": "libpipewire-module-rt",
|
||||
"args": {
|
||||
"nice.level": -11
|
||||
},
|
||||
"flags": [
|
||||
"ifexists",
|
||||
"nofail"
|
||||
|
@ -37,6 +39,61 @@
|
|||
}
|
||||
}
|
||||
],
|
||||
"context.exec": [],
|
||||
"stream.properties": {}
|
||||
"context.exec": [
|
||||
{
|
||||
"path": "pactl",
|
||||
"args": "load-module module-always-sink"
|
||||
}
|
||||
],
|
||||
"stream.properties": {},
|
||||
"pulse.rules": [
|
||||
{
|
||||
"matches": [
|
||||
{}
|
||||
],
|
||||
"actions": {
|
||||
"update-props": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"matches": [
|
||||
{
|
||||
"application.process.binary": "teams"
|
||||
},
|
||||
{
|
||||
"application.process.binary": "skypeforlinux"
|
||||
}
|
||||
],
|
||||
"actions": {
|
||||
"quirks": [
|
||||
"force-s16-info"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"matches": [
|
||||
{
|
||||
"application.process.binary": "firefox"
|
||||
}
|
||||
],
|
||||
"actions": {
|
||||
"quirks": [
|
||||
"remove-capture-dont-move"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"matches": [
|
||||
{
|
||||
"application.name": "~speech-dispatcher*"
|
||||
}
|
||||
],
|
||||
"actions": {
|
||||
"update-props": {
|
||||
"pulse.min.req": "1024/48000",
|
||||
"pulse.min.quantum": "1024/48000"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
"link.max-buffers": 16,
|
||||
"core.daemon": true,
|
||||
"core.name": "pipewire-0",
|
||||
"default.clock.min-quantum": 16,
|
||||
"vm.overrides": {
|
||||
"default.clock.min-quantum": 1024
|
||||
}
|
||||
|
@ -19,8 +20,10 @@
|
|||
},
|
||||
"context.modules": [
|
||||
{
|
||||
"name": "libpipewire-module-rtkit",
|
||||
"args": {},
|
||||
"name": "libpipewire-module-rt",
|
||||
"args": {
|
||||
"nice.level": -11
|
||||
},
|
||||
"flags": [
|
||||
"ifexists",
|
||||
"nofail"
|
||||
|
|
|
@ -25,15 +25,18 @@ let
|
|||
client = lib.importJSON ./daemon/client.conf.json;
|
||||
client-rt = lib.importJSON ./daemon/client-rt.conf.json;
|
||||
jack = lib.importJSON ./daemon/jack.conf.json;
|
||||
minimal = lib.importJSON ./daemon/minimal.conf.json;
|
||||
pipewire = lib.importJSON ./daemon/pipewire.conf.json;
|
||||
pipewire-pulse = lib.importJSON ./daemon/pipewire-pulse.conf.json;
|
||||
};
|
||||
|
||||
useSessionManager = cfg.wireplumber.enable || cfg.media-session.enable;
|
||||
|
||||
configs = {
|
||||
client = recursiveUpdate defaults.client cfg.config.client;
|
||||
client-rt = recursiveUpdate defaults.client-rt cfg.config.client-rt;
|
||||
jack = recursiveUpdate defaults.jack cfg.config.jack;
|
||||
pipewire = recursiveUpdate defaults.pipewire cfg.config.pipewire;
|
||||
pipewire = recursiveUpdate (if useSessionManager then defaults.pipewire else defaults.minimal) cfg.config.pipewire;
|
||||
pipewire-pulse = recursiveUpdate defaults.pipewire-pulse cfg.config.pipewire-pulse;
|
||||
};
|
||||
in {
|
||||
|
|
|
@ -2,8 +2,6 @@ import ./make-test-python.nix ({ pkgs, lib, ... }:
|
|||
|
||||
let
|
||||
configDir = "/var/lib/foobar";
|
||||
mqttUsername = "homeassistant";
|
||||
mqttPassword = "secret";
|
||||
in {
|
||||
name = "home-assistant";
|
||||
meta.maintainers = lib.teams.home-assistant.members;
|
||||
|
@ -11,18 +9,6 @@ in {
|
|||
nodes.hass = { pkgs, ... }: {
|
||||
environment.systemPackages = with pkgs; [ mosquitto ];
|
||||
|
||||
services.mosquitto = {
|
||||
enable = true;
|
||||
listeners = [ {
|
||||
users = {
|
||||
"${mqttUsername}" = {
|
||||
acl = [ "readwrite #" ];
|
||||
password = mqttPassword;
|
||||
};
|
||||
};
|
||||
} ];
|
||||
};
|
||||
|
||||
services.postgresql = {
|
||||
enable = true;
|
||||
ensureDatabases = [ "hass" ];
|
||||
|
@ -76,23 +62,6 @@ in {
|
|||
# https://www.home-assistant.io/integrations/frontend/
|
||||
frontend = {};
|
||||
|
||||
# configure an mqtt broker connection
|
||||
# https://www.home-assistant.io/integrations/mqtt
|
||||
mqtt = {
|
||||
broker = "127.0.0.1";
|
||||
username = mqttUsername;
|
||||
password = mqttPassword;
|
||||
};
|
||||
|
||||
# create a mqtt sensor that syncs state with its mqtt topic
|
||||
# https://www.home-assistant.io/integrations/sensor.mqtt/
|
||||
binary_sensor = [ {
|
||||
platform = "mqtt";
|
||||
state_topic = "home-assistant/test";
|
||||
payload_on = "let_there_be_light";
|
||||
payload_off = "off";
|
||||
} ];
|
||||
|
||||
# set up a wake-on-lan switch to test capset capability required
|
||||
# for the ping suid wrapper
|
||||
# https://www.home-assistant.io/integrations/wake_on_lan/
|
||||
|
@ -109,11 +78,9 @@ in {
|
|||
listen_port = 80;
|
||||
};
|
||||
|
||||
# show mqtt interaction in the log
|
||||
# https://www.home-assistant.io/integrations/logger/
|
||||
logger = {
|
||||
default = "info";
|
||||
logs."homeassistant.components.mqtt" = "debug";
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -167,12 +134,6 @@ in {
|
|||
hass.wait_for_open_port(8123)
|
||||
hass.succeed("curl --fail http://localhost:8123/lovelace")
|
||||
|
||||
with subtest("Toggle a binary sensor using MQTT"):
|
||||
hass.wait_for_open_port(1883)
|
||||
hass.succeed(
|
||||
"mosquitto_pub -V mqttv5 -t home-assistant/test -u ${mqttUsername} -P '${mqttPassword}' -m let_there_be_light"
|
||||
)
|
||||
|
||||
with subtest("Check that capabilities are passed for emulated_hue to bind to port 80"):
|
||||
hass.wait_for_open_port(80)
|
||||
hass.succeed("curl --fail http://localhost:80/description.xml")
|
||||
|
@ -188,10 +149,6 @@ in {
|
|||
with subtest("Check that no errors were logged"):
|
||||
assert "ERROR" not in output_log
|
||||
|
||||
# example line: 2020-06-20 10:01:32 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on home-assistant/test: b'let_there_be_light'
|
||||
with subtest("Check we received the mosquitto message"):
|
||||
assert "let_there_be_light" in output_log
|
||||
|
||||
with subtest("Check systemd unit hardening"):
|
||||
hass.log(hass.succeed("systemctl cat home-assistant.service"))
|
||||
hass.log(hass.succeed("systemd-analyze security home-assistant.service"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue