config/modules/nixos/services/gdm-fuckery/default.nix

24 lines
499 B
Nix
Raw Normal View History

2025-05-19 18:28:46 -04:00
{
lib,
config,
pkgs,
...
}:
with lib;
with lib.custom; let
cfg = config.services.gdm-monitors;
montiorsXmlContent = builtins.readFile ./monitors.xml;
monitorsConfig = pkgs.writeText "gdm_monitors.xml" montiorsXmlContent;
in {
options.services.gdm-monitors = with types; {
enable = mkBoolOpt false "Enable Monitors config for GDM";
};
config = mkIf cfg.enable {
systemd.tmpfiles.rules = [
"L+ /run/gdm/.config/monitors.xml - - - - ${monitorsConfig}"
];
};
}