nixos-config/users/simon/modules/sway/kanshi.nix

45 lines
980 B
Nix

{ lib, nixosConfig, ... }:
let
getMachineConfig = machine:
if lib.hasAttr machine machineConfigs
then lib.getAttr machine machineConfigs
else { };
machineConfigs = {
mayushii = {
standalone.outputs = lib.singleton {
criteria = "eDP-1";
mode = "1920x1080";
position = "0,0";
status = "enable";
};
home.outputs = [
{
criteria = "eDP-1";
position = "1920,0";
status = "disable";
}
{
criteria = "Acer Technologies Acer B277K 0x0000F36C";
mode = "3840x2160";
position = "0,0";
scale = 2.0;
}
];
};
sayuri = {
home.outputs = lib.singleton {
criteria = "Acer Technologies Acer B277K 0x0000F36C";
mode = "3840x2160";
scale = 2.0;
};
};
};
in
{
services.kanshi = {
enable = true;
profiles = getMachineConfig (nixosConfig.networking.hostName);
};
}