feat: add custom SDDM login theme

This commit is contained in:
hhhh hgfh 2026-10-05 00:37:52 +03:00
parent 3f0609bcfc
commit 7ae4243548
4 changed files with 241 additions and 0 deletions

View file

@ -5,6 +5,7 @@
./hardware-configuration.nix
../../modules/desktop.nix
../../modules/hardware.nix
../../modules/login-theme.nix
../../modules/packages
../../modules/system.nix
../../modules/users.nix

View file

@ -0,0 +1,26 @@
{ pkgs, ... }:
let
theme = pkgs.stdenvNoCC.mkDerivation {
pname = "sddm-custom-environment";
version = "1.0";
src = ../../sddm;
dontBuild = true;
installPhase = ''
runHook preInstall
themeDir="$out/share/sddm/themes/custom-environment"
mkdir -p "$themeDir"
cp Main.qml metadata.desktop "$themeDir/"
cp ${../../wallpapers/night_city.jpg} "$themeDir/background.jpg"
cp ${../../wallpapers/kotost.png} "$themeDir/avatar.png"
cp ${pkgs.nerd-fonts.profont}/share/fonts/truetype/NerdFonts/ProFont/ProFontWindowsNerdFontMono-Regular.ttf "$themeDir/font.ttf"
runHook postInstall
'';
};
in
{
system.build.sddmTheme = theme;
environment.systemPackages = [ theme ];
services.displayManager.sddm.theme = "custom-environment";
services.displayManager.sddm.extraPackages = [ pkgs.qt6.qtimageformats ];
}