nixos/home/common/optional/desktop/cinnamon/cinnamon-monitors.nix

30 lines
1.0 KiB
Nix

{ pkgs, ... }: {
home.file.".config/cinnamon-monitors".text = ''
<monitors version="2">
<configuration>
${builtins.concatStringsSep "\n" (map (monitor: ''
<logicalmonitor>
<x>${toString monitor.x}</x>
<y>${toString monitor.y}</y>
<scale>${toString monitor.scale}</scale>
${if monitor.primary then "<primary>yes</primary>" else ""}
<monitor>
<monitorspec>
<connector>${toString monitor.name}</connector>
<vendor>${toString monitor.vendor}</vendor>
<product>${toString monitor.product}</product>
<serial>${toString monitor.serial}</serial>
</monitorspec>
<mode>
<width>${toString monitor.width}</width>
<height>${toString monitor.height}</height>
<rate>${toString monitor.refreshRate}</rate>
</mode>
</monitor>
</logicalmonitor>
''))}
</configuration>
</monitors>
'';
}