way-displays: init module (#6791)

This commit is contained in:
Johan Larsson 2025-04-11 15:15:26 +02:00 committed by GitHub
parent e15c4203ea
commit f0c69ede70
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 195 additions and 1 deletions

View file

@ -0,0 +1,43 @@
{ config, ... }:
{
config = {
services.way-displays = {
enable = true;
package = config.lib.test.mkStubPackage { };
settings = {
CALLBACK_CMD = "notify-send \"way-displays \${CALLBACK_LEVEL}\" \"\${CALLBACK_MSG}\"";
ORDER = [
"eDP-1"
"DELL U2419HC"
"DELL U2415"
"HP E24 G5"
"HP E24 G5"
];
ALIGN = "MIDDLE";
VRR_OFF = [
"DELL U2419HC"
"DELL U2415"
];
TRANSFORM = [
{
NAME_DESC = "DELL U2419HC";
TRANSFORM = "90";
}
{
NAME_DESC = "HP E24 G5";
TRANSFORM = "90";
}
];
};
};
nmt.script = ''
serviceFile=home-files/.config/systemd/user/way-displays.service
assertFileExists $serviceFile
assertFileExists home-files/.config/way-displays/cfg.yaml
assertFileContent home-files/.config/way-displays/cfg.yaml \
${./configuration.yaml}
'';
};
}

View file

@ -0,0 +1,16 @@
ALIGN: MIDDLE
CALLBACK_CMD: notify-send "way-displays ${CALLBACK_LEVEL}" "${CALLBACK_MSG}"
ORDER:
- eDP-1
- DELL U2419HC
- DELL U2415
- HP E24 G5
- HP E24 G5
TRANSFORM:
- NAME_DESC: DELL U2419HC
TRANSFORM: '90'
- NAME_DESC: HP E24 G5
TRANSFORM: '90'
VRR_OFF:
- DELL U2419HC
- DELL U2415

View file

@ -0,0 +1,3 @@
{
way-displays-configuration = ./configuration.nix;
}