summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2021-07-23 18:01:46 +0000
committerGitHub <noreply@github.com>2021-07-23 18:01:46 +0000
commitcb1426e30a08f10a2af007d14b869a3692e92687 (patch)
treef1bb42016e0268d9cdb042103297b19731b82f23 /nixos
parent3e712c9a24e7ba3e88539d530a809077741b6ead (diff)
parentfa1fcd46e9abeea6008f7c3ce1e9e8a542864706 (diff)
downloadnixpkgs-cb1426e30a08f10a2af007d14b869a3692e92687.tar
nixpkgs-cb1426e30a08f10a2af007d14b869a3692e92687.tar.gz
nixpkgs-cb1426e30a08f10a2af007d14b869a3692e92687.tar.bz2
nixpkgs-cb1426e30a08f10a2af007d14b869a3692e92687.tar.lz
nixpkgs-cb1426e30a08f10a2af007d14b869a3692e92687.tar.xz
nixpkgs-cb1426e30a08f10a2af007d14b869a3692e92687.tar.zst
nixpkgs-cb1426e30a08f10a2af007d14b869a3692e92687.zip
Merge staging-next into staging
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/services/misc/klipper.nix8
-rw-r--r--nixos/tests/all-tests.nix1
-rw-r--r--nixos/tests/grocy.nix2
-rw-r--r--nixos/tests/tuxguitar.nix24
4 files changed, 33 insertions, 2 deletions
diff --git a/nixos/modules/services/misc/klipper.nix b/nixos/modules/services/misc/klipper.nix
index 4930648ba8e..909408225e0 100644
--- a/nixos/modules/services/misc/klipper.nix
+++ b/nixos/modules/services/misc/klipper.nix
@@ -2,7 +2,13 @@
 with lib;
 let
   cfg = config.services.klipper;
-  format = pkgs.formats.ini { mkKeyValue = generators.mkKeyValueDefault {} ":"; };
+  format = pkgs.formats.ini {
+    # https://github.com/NixOS/nixpkgs/pull/121613#issuecomment-885241996
+    listToValue = l:
+      if builtins.length l == 1 then generators.mkValueStringDefault {} (head l)
+      else lib.concatMapStrings (s: "\n  ${generators.mkValueStringDefault {} s}") l;
+    mkKeyValue = generators.mkKeyValueDefault {} ":";
+  };
 in
 {
   ##### interface
diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix
index 071a8175b4d..ae2aff2226b 100644
--- a/nixos/tests/all-tests.nix
+++ b/nixos/tests/all-tests.nix
@@ -441,6 +441,7 @@ in
   txredisapi = handleTest ./txredisapi.nix {};
   tuptime = handleTest ./tuptime.nix {};
   turbovnc-headless-server = handleTest ./turbovnc-headless-server.nix {};
+  tuxguitar = handleTest ./tuxguitar.nix {};
   ucarp = handleTest ./ucarp.nix {};
   ucg = handleTest ./ucg.nix {};
   udisks2 = handleTest ./udisks2.nix {};
diff --git a/nixos/tests/grocy.nix b/nixos/tests/grocy.nix
index 220c55b1f63..2be5c24ecb5 100644
--- a/nixos/tests/grocy.nix
+++ b/nixos/tests/grocy.nix
@@ -40,7 +40,7 @@ import ./make-test-python.nix ({ pkgs, ... }: {
 
     assert task_name == "Test Task"
 
-    machine.succeed("curl -sSfI http://localhost/api/tasks 2>&1 | grep '401 Unauthorized'")
+    machine.succeed("curl -sSI http://localhost/api/tasks 2>&1 | grep '401 Unauthorized'")
 
     machine.shutdown()
   '';
diff --git a/nixos/tests/tuxguitar.nix b/nixos/tests/tuxguitar.nix
new file mode 100644
index 00000000000..6586132d3cd
--- /dev/null
+++ b/nixos/tests/tuxguitar.nix
@@ -0,0 +1,24 @@
+import ./make-test-python.nix ({ pkgs, ... }: {
+  name = "tuxguitar";
+  meta = with pkgs.lib.maintainers; {
+    maintainers = [ asbachb ];
+  };
+
+  machine = { config, pkgs, ... }: {
+    imports = [
+      ./common/x11.nix
+    ];
+
+    services.xserver.enable = true;
+
+    environment.systemPackages = [ pkgs.tuxguitar ];
+  };
+
+  testScript = ''
+    machine.wait_for_x()
+    machine.succeed("tuxguitar &")
+    machine.wait_for_window("TuxGuitar - Untitled.tg")
+    machine.sleep(1)
+    machine.screenshot("tuxguitar")
+  '';
+})