{ lib, config, ... }: let inherit (config.rose-pine) sources; cfg = config.services.displayManager.sddm.rose-pine; enable = cfg.enable && config.services.displayManager.sddm.enable; in { options.services.displayManager.sddm.rose-pine = lib.rp.mkRosePineOpt {name = "sddm";}; config = lib.mkIf enable { services.displayManager.sddm.theme = "rose-pine"; environment.systemPackages = [ ( { stdenvNoCC, libsForQt5, }: stdenvNoCC.mkDerivation { pname = "sddm-rose-pine-theme"; version = "1.2"; dontBuild = true; propagatedUserEnvPkgs = [ libsForQt5.qt5.qtgraphicaleffects ]; src = sources.sddm; installPhase = '' mkdir -p $out/share/sddm/themes cp -aR $src $out/share/sddm/themes/rose-pine ''; } ) ]; }; }