{
  pkgs,
  config,
  lib,
  ...
}: let
  foreground = config.stylix.base16Scheme.base00;
  textColor = config.stylix.base16Scheme.base05;
  sddm-astronaut = pkgs.sddm-astronaut.override {
    embeddedTheme = "pixel_sakura";
    themeConfig = {
      FormPosition = "left";
      Blur = "4.0";
      Background = "${toString config.stylix.image}";
      HeaderTextColor = "#${textColor}";
      DateTextColor = "#${textColor}";
      TimeTextColor = "#${textColor}";
      LoginFieldTextColor = "#${textColor}";
      PasswordFieldTextColor = "#${textColor}";
      UserIconColor = "#${textColor}";
      PasswordIconColor = "#${textColor}";
      WarningColor = "#${textColor}";
      LoginButtonBackgroundColor = "#${config.stylix.base16Scheme.base01}";
      SystemButtonsIconsColor = "#${textColor}";
      SessionButtonTextColor = "#${textColor}";
      VirtualKeyboardButtonTextColor = "#${textColor}";
      DropdownBackgroundColor = "#${config.stylix.base16Scheme.base01}";
      HighlightBackgroundColor = "#${textColor}";
      FormBackgroundColor = "#${config.stylix.base16Scheme.base01}";
    };
  };
in {
  services.displayManager = {
    sddm = {
      package = pkgs.kdePackages.sddm;
      extraPackages = [sddm-astronaut];
      enable = true;
      wayland.enable = false;
      theme = "sddm-astronaut-theme";
    };
  };

  environment.systemPackages = [sddm-astronaut];
}
