1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-12-24 18:59:47 +01:00
home-manager/tests/modules/services/kanshi/basic-configuration.nix
Nicolas Berbiche 182454fe6b
kanshi: fix exec configuration
Also add a test case for the exec option.

PR #1446
2020-09-04 16:45:42 +02:00

52 lines
1.3 KiB
Nix

{ config, pkgs, ... }: {
config = {
services.kanshi = {
enable = true;
package = pkgs.writeScriptBin "dummy-kanshi" "";
profiles = {
nomad = {
outputs = [{
criteria = "eDP-1";
status = "enable";
}];
};
desktop = {
exec = ''echo "1 two 3"'';
outputs = [
{
criteria = "eDP-1";
status = "disable";
}
{
criteria = "Iiyama North America PLE2483H-DP";
status = "enable";
position = "0,0";
}
{
criteria = "Iiyama North America PLE2483H-DP 1158765348486";
status = "enable";
position = "1920,0";
scale = 2.1;
mode = "1920x1080";
transform = "flipped-270";
}
];
};
};
extraConfig = ''
profile test {
output "*" enable
}
'';
};
nmt.script = ''
serviceFile=home-files/.config/systemd/user/kanshi.service
assertFileExists $serviceFile
assertFileExists home-files/.config/kanshi/config
assertFileContent home-files/.config/kanshi/config \
${./basic-configuration.conf}
'';
};
}