home-manager/tests/modules/programs/waybar/systemd-with-graphical-session-target.nix
Thiago Kenji Okada 8587c2ff0e
waybar: use config.wayland.systemd.target
Also add `ConditionEnvironment`.
2025-01-03 17:37:42 +01:00

24 lines
619 B
Nix

{ config, ... }:
{
config = {
home.stateVersion = "21.11";
programs.waybar = {
package = config.lib.test.mkStubPackage { outPath = "@waybar@"; };
enable = true;
systemd.enable = true;
systemd.target = "sway-session.target";
};
nmt.script = ''
assertPathNotExists home-files/.config/waybar/config
assertPathNotExists home-files/.config/waybar/style.css
serviceFile=$(normalizeStorePaths home-files/.config/systemd/user/waybar.service)
assertFileContent "$serviceFile" ${
./systemd-with-graphical-session-target.service
}
'';
};
}