{ lib, config, ... }: let inherit (lib) mkIf; cfg = config.desktops.ly; in { config = mkIf cfg.enable { # display manager services.displayManager.ly = { enable = true; settings = let base = "0x00${config.theme.colors.base}"; text = "0x00${config.theme.colors.text}"; bold = "0x01${config.theme.colors.text}"; error = "0x00${config.theme.colors.error}"; red = "0x00${config.theme.colors.normal.red}"; blue = "0x00${config.theme.colors.normal.blue}"; in { # general clear_password = true; default_input = "password"; xinitrc = "null"; hide_version_string = true; hide_key_hints = true; session_log = "/dev/null"; # state (evil) tty = 1; # background bg = base; error_bg = base; blank_box = true; # foreground fg = text; error_fg = error; border_fg = bold; # animation animation = "colormix"; colormix_col1 = blue; colormix_col2 = red; colormix_col3 = "0x20000000"; }; }; # disable default login on tty 1 systemd.services."autovt@tty1".enable = false; systemd.services."getty@tty1".enable = false; # fix env not being set systemd.services.display-manager = { environment.XDG_CURRENT_DESKTOP = "X-NIXOS-SYSTEMD-AWARE"; }; # write save file environment.etc."ly/save.txt".text = '' 0 ${config.user}:1 ''; }; }