home-manager/tests/modules/programs/waybar/systemd-with-graphical-session-target.nix

27 lines
641 B
Nix
Raw Normal View History

2020-07-29 20:29:51 +00:00
{ config, lib, pkgs, ... }:
with lib;
{
2020-07-29 20:29:51 +00:00
config = {
home.stateVersion = "21.11";
2020-07-29 20:29:51 +00:00
programs.waybar = {
package = config.lib.test.mkStubPackage { outPath = "@waybar@"; };
2020-07-29 20:29:51 +00:00
enable = true;
systemd.enable = true;
systemd.target = "sway-session.target";
2020-07-29 20:29:51 +00:00
};
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
}
2020-07-29 20:29:51 +00:00
'';
};
}