diff options
Diffstat (limited to 'home-manager/tests/modules/services/kanshi')
3 files changed, 68 insertions, 0 deletions
diff --git a/home-manager/tests/modules/services/kanshi/basic-configuration.conf b/home-manager/tests/modules/services/kanshi/basic-configuration.conf new file mode 100644 index 00000000000..9d6442b985b --- /dev/null +++ b/home-manager/tests/modules/services/kanshi/basic-configuration.conf @@ -0,0 +1,15 @@ +profile desktop { + output "eDP-1" disable + output "Iiyama North America PLE2483H-DP" enable position 0,0 + output "Iiyama North America PLE2483H-DP 1158765348486" enable mode 1920x1080 position 1920,0 scale 2.100000 transform flipped-270 + exec echo "1 two 3" +} + +profile nomad { + output "eDP-1" enable +} + +profile test { + output "*" enable +} + diff --git a/home-manager/tests/modules/services/kanshi/basic-configuration.nix b/home-manager/tests/modules/services/kanshi/basic-configuration.nix new file mode 100644 index 00000000000..15fbbb9ceb1 --- /dev/null +++ b/home-manager/tests/modules/services/kanshi/basic-configuration.nix @@ -0,0 +1,52 @@ +{ 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} + ''; + }; +} diff --git a/home-manager/tests/modules/services/kanshi/default.nix b/home-manager/tests/modules/services/kanshi/default.nix new file mode 100644 index 00000000000..cb6b2a6b79f --- /dev/null +++ b/home-manager/tests/modules/services/kanshi/default.nix @@ -0,0 +1 @@ +{ kanshi-basic-configuration = ./basic-configuration.nix; } |