dotfiles/modules/home/gui/desktop/niri/config/outputs.nix
2025-05-16 20:03:42 -05:00

39 lines
672 B
Nix
Executable file

{
colourHelpers,
flake,
osConfig,
...
}:
let
inherit (flake.config.machines) devices;
mars = devices.mars.name;
deimos = devices.deimos.name;
host = osConfig.networking.hostName;
deviceLogic =
d: m:
if host == deimos then
d
else if host == mars then
m
else
null;
in
{
outputs = {
"${deviceLogic "eDP-1" "DP-1"}" = {
background-color = colourHelpers.makeColour colourHelpers.el.base02;
scale = 1.0;
mode = {
width = deviceLogic 1920 2560;
height = 1080;
refresh = deviceLogic 59.94 199.92;
};
position = {
x = 0;
y = 0;
};
};
};
}