1
0
mirror of https://github.com/nix-community/home-manager synced 2024-07-04 20:33:27 +02:00
home-manager/tests/modules/services/window-managers/herbstluftwm/herbstluftwm-no-tags.nix
Olmo Kramer 1a0a5f5037
herbstluftwm: Fix error when no tags set
The default value for `xsession.windowManager.herbstluftwm.tags` is an
empty list, but the config file uses `builtins.head` on it, which causes
an error upon evaluation. With this change the tags configuration is
skipped if the list is empty.
2022-12-19 22:40:24 +01:00

17 lines
416 B
Nix

{ lib, pkgs, ... }:
{
xsession.windowManager.herbstluftwm = { enable = true; };
test.stubs.herbstluftwm = { };
nmt.script = ''
autostart=home-files/.config/herbstluftwm/autostart
assertFileExists "$autostart"
assertFileIsExecutable "$autostart"
normalizedAutostart=$(normalizeStorePaths "$autostart")
assertFileContent "$normalizedAutostart" ${./herbstluftwm-no-tags-autostart}
'';
}