1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-14 15:19:45 +01:00
home-manager/tests/modules/services/kanshi/basic-configuration.nix

65 lines
1.7 KiB
Nix
Raw Normal View History

2020-04-12 15:42:43 +02:00
{ config, pkgs, ... }: {
config = {
services.kanshi = {
enable = true;
package = config.lib.test.mkStubPackage { };
2020-04-12 15:42:43 +02:00
profiles = {
nomad = {
outputs = [{
criteria = "eDP-1";
status = "enable";
}];
};
desktop = {
exec = [ ''echo "1 two 3"'' ''echo "4 five 6"'' ];
2020-04-12 15:42:43 +02:00
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";
}
];
};
backwardsCompat = {
outputs = [{
criteria = "LVDS-1";
status = "enable";
}];
exec = ''echo "7 eight 9"'';
};
2020-04-12 15:42:43 +02:00
};
extraConfig = ''
profile test {
output "*" enable
}
'';
};
test.asserts.warnings.expected = [
"kanshi.profiles option is deprecated. Use kanshi.settings instead."
"kanshi.extraConfig option is deprecated. Use kanshi.settings instead."
];
2020-04-12 15:42:43 +02:00
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}
'';
};
}