rose-pine-nix/modules/nixos/sddm.nix

41 lines
942 B
Nix
Raw Normal View History

2024-05-21 14:53:46 -07:00
{
lib,
config,
...
2024-10-20 17:26:38 -07:00
}: let
inherit (config.rose-pine) sources;
cfg = config.services.displayManager.sddm.rose-pine;
enable = cfg.enable && config.services.displayManager.sddm.enable;
2024-10-20 17:26:38 -07:00
in {
options.services.displayManager.sddm.rose-pine = lib.rp.mkRosePineOpt {name = "sddm";};
2024-10-20 17:26:38 -07:00
config = lib.mkIf enable {
services.displayManager.sddm.theme = "rose-pine";
environment.systemPackages = [
2024-10-20 17:26:38 -07:00
(
{
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
'';
}
)
];
};
}