diff options
author | Vincent Gatine <nurelin@nurelin.eu> | 2020-04-12 15:42:43 +0200 |
---|---|---|
committer | Robert Helgesson <robert@rycee.net> | 2020-08-15 01:02:23 +0200 |
commit | a3dd580adc46628dd0c970037b6c87cff1251af5 (patch) | |
tree | d9d9cd9572ad075e860dd554c725f671c0588364 /tests | |
parent | 2bcd96928e1f831f8cedff76ac733df9f1f5e0fe (diff) |
kanshi: add service
PR #1142
Diffstat (limited to 'tests')
-rw-r--r-- | tests/default.nix | 1 | ||||
-rw-r--r-- | tests/modules/services/kanshi/basic-configuration.conf | 14 | ||||
-rw-r--r-- | tests/modules/services/kanshi/basic-configuration.nix | 51 | ||||
-rw-r--r-- | tests/modules/services/kanshi/default.nix | 1 |
4 files changed, 67 insertions, 0 deletions
diff --git a/tests/default.nix b/tests/default.nix index 939a50e2d83..3aa0c54431f 100644 --- a/tests/default.nix +++ b/tests/default.nix @@ -83,6 +83,7 @@ import nmt { ./modules/services/lieer ./modules/programs/rofi ./modules/programs/waybar + ./modules/services/kanshi ./modules/services/polybar ./modules/services/sxhkd ./modules/services/fluidsynth diff --git a/tests/modules/services/kanshi/basic-configuration.conf b/tests/modules/services/kanshi/basic-configuration.conf new file mode 100644 index 00000000000..905a539d0db --- /dev/null +++ b/tests/modules/services/kanshi/basic-configuration.conf @@ -0,0 +1,14 @@ +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 +} + +profile nomad { + output "eDP-1" enable +} + +profile test { + output "*" enable +} + diff --git a/tests/modules/services/kanshi/basic-configuration.nix b/tests/modules/services/kanshi/basic-configuration.nix new file mode 100644 index 00000000000..08a2c167ea7 --- /dev/null +++ b/tests/modules/services/kanshi/basic-configuration.nix @@ -0,0 +1,51 @@ +{ config, pkgs, ... }: { + config = { + services.kanshi = { + enable = true; + package = pkgs.writeScriptBin "dummy-kanshi" ""; + profiles = { + nomad = { + outputs = [{ + criteria = "eDP-1"; + status = "enable"; + }]; + }; + desktop = { + 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/tests/modules/services/kanshi/default.nix b/tests/modules/services/kanshi/default.nix new file mode 100644 index 00000000000..cb6b2a6b79f --- /dev/null +++ b/tests/modules/services/kanshi/default.nix @@ -0,0 +1 @@ +{ kanshi-basic-configuration = ./basic-configuration.nix; } |