aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAlex Rice <alexrice999@hotmail.co.uk>2020-07-13 12:31:55 +0100
committerRobert Helgesson <robert@rycee.net>2020-08-26 00:05:05 +0200
commit0869e237007aa48f458c9d9ba9080280565a7160 (patch)
treeba335b0301fc5f9f8b0620295d97c73d0154abdf /tests
parent625b92cbba26852d80eb9a221f93cad0c4efa17b (diff)
sway: set bar defaults to null
Allows fields of bar to be nullable and omit them from the generated configuration if unset. Fixes #1361 PR #1386
Diffstat (limited to 'tests')
-rw-r--r--tests/modules/services/window-managers/sway/default.nix1
-rw-r--r--tests/modules/services/window-managers/sway/sway-post-2003.nix35
2 files changed, 36 insertions, 0 deletions
diff --git a/tests/modules/services/window-managers/sway/default.nix b/tests/modules/services/window-managers/sway/default.nix
index 6b545a26a44..b9c0ab5e099 100644
--- a/tests/modules/services/window-managers/sway/default.nix
+++ b/tests/modules/services/window-managers/sway/default.nix
@@ -1,5 +1,6 @@
{
sway-default = ./sway-default.nix;
+ sway-post-2003 = ./sway-post-2003.nix;
sway-followmouse = ./sway-followmouse.nix;
sway-followmouse-legacy = ./sway-followmouse-legacy.nix;
}
diff --git a/tests/modules/services/window-managers/sway/sway-post-2003.nix b/tests/modules/services/window-managers/sway/sway-post-2003.nix
new file mode 100644
index 00000000000..3eab6538e42
--- /dev/null
+++ b/tests/modules/services/window-managers/sway/sway-post-2003.nix
@@ -0,0 +1,35 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+{
+ config = {
+ home.stateVersion = "20.09";
+
+ wayland.windowManager.sway = {
+ enable = true;
+ package = pkgs.runCommandLocal "dummy-package" { } "mkdir $out" // {
+ outPath = "@sway";
+ };
+ # overriding findutils causes issues
+ config.menu = "${pkgs.dmenu}/bin/dmenu_run";
+ };
+
+ nixpkgs.overlays = [
+ (self: super: {
+ dummy-package = super.runCommandLocal "dummy-package" { } "mkdir $out";
+ dmenu = self.dummy-package // { outPath = "@dmenu@"; };
+ rxvt-unicode-unwrapped = self.dummy-package // {
+ outPath = "@rxvt-unicode-unwrapped@";
+ };
+ i3status = self.dummy-package // { outPath = "@i3status@"; };
+ })
+ ];
+
+ nmt.script = ''
+ assertFileExists home-files/.config/sway/config
+ assertFileContent home-files/.config/sway/config \
+ ${./sway-default.conf}
+ '';
+ };
+}