aboutsummaryrefslogtreecommitdiff
path: root/tests/modules/services/kanshi/basic-configuration.nix
diff options
context:
space:
mode:
Diffstat (limited to 'tests/modules/services/kanshi/basic-configuration.nix')
-rw-r--r--tests/modules/services/kanshi/basic-configuration.nix51
1 files changed, 51 insertions, 0 deletions
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}
+ '';
+ };
+}