From d7cd5c14c94b5b8442aafc186038d42104ecb5d2 Mon Sep 17 00:00:00 2001 From: Gabriel Arazas Date: Wed, 6 Mar 2024 20:28:21 +0800 Subject: [PATCH] tests/modules/home-manager: init programs.pipewire --- tests/modules/home-manager/default.nix | 1 + .../home-manager/programs/pipewire/basic.nix | 32 +++++++++++++++++++ .../programs/pipewire/default.nix | 4 +++ .../home-manager/programs/pipewire/empty.nix | 12 +++++++ 4 files changed, 49 insertions(+) create mode 100644 tests/modules/home-manager/programs/pipewire/basic.nix create mode 100644 tests/modules/home-manager/programs/pipewire/default.nix create mode 100644 tests/modules/home-manager/programs/pipewire/empty.nix diff --git a/tests/modules/home-manager/default.nix b/tests/modules/home-manager/default.nix index 0583180d..3430ecd2 100644 --- a/tests/modules/home-manager/default.nix +++ b/tests/modules/home-manager/default.nix @@ -52,6 +52,7 @@ import nmt { testedAttrPath = [ "home" "activationPackage" ]; tests = builtins.foldl' (a: b: a // (import b)) { } [ ./programs/neovide + ./programs/pipewire ./programs/pop-launcher ]; } diff --git a/tests/modules/home-manager/programs/pipewire/basic.nix b/tests/modules/home-manager/programs/pipewire/basic.nix new file mode 100644 index 00000000..5909b35d --- /dev/null +++ b/tests/modules/home-manager/programs/pipewire/basic.nix @@ -0,0 +1,32 @@ +{ lib, ... }: + +{ + programs.pipewire = { + enable = true; + settings = { + hello = "world"; + what = true; + oh.wow = "!!!"; + }; + overrides = { + noisetorch = { + bawk-bawk = true; + reduce-noise-level = 0.5; + }; + nvidia-ai-what = { + hawk-hawk = true; + reduce-muffled-sounds = true; + noise-gate = 5.60; + abc = [ "d" "e" "f" ]; + }; + }; + }; + + test.stubs.pipewire = { }; + + nmt.script = '' + assertFileExists home-files/.config/pipewire/pipewire.conf + assertFileExists home-files/.config/pipewire/pipewire.conf.d/noisetorch.conf + assertFileExists home-files/.config/pipewire/pipewire.conf.d/nvidia-ai-what.conf + ''; +} diff --git a/tests/modules/home-manager/programs/pipewire/default.nix b/tests/modules/home-manager/programs/pipewire/default.nix new file mode 100644 index 00000000..5419771e --- /dev/null +++ b/tests/modules/home-manager/programs/pipewire/default.nix @@ -0,0 +1,4 @@ +{ + pipewire-basic = ./basic.nix; + pipewire-empty = ./empty.nix; +} diff --git a/tests/modules/home-manager/programs/pipewire/empty.nix b/tests/modules/home-manager/programs/pipewire/empty.nix new file mode 100644 index 00000000..6389c0fa --- /dev/null +++ b/tests/modules/home-manager/programs/pipewire/empty.nix @@ -0,0 +1,12 @@ +{ lib, ... }: + +{ + programs.pipewire.enable = true; + + test.stubs.pipewire = { }; + + nmt.script = '' + assertPathNotExists home-files/.config/pipewire/pipewire.conf + assertPathNotExists home-files/.config/pipewire/pipewire.conf.d + ''; +}