style: change sddm theme

This commit is contained in:
DACHXY 2025-01-08 17:24:22 +08:00
parent 6f4a849ddb
commit 9e46058abb
5 changed files with 79 additions and 5 deletions

View file

@ -0,0 +1,33 @@
{
pkgs,
lib,
stdenvNoCC,
themeConfig ? null,
}:
stdenvNoCC.mkDerivation {
name = "aerial-sddm-theme";
dontWrapQtApps = true;
src = pkgs.fetchFromGitHub {
owner = "3ximus";
repo = "aerial-sddm-theme";
rev = "484b52e";
sha256 = "sha256-YeJTdlnGV58MNB8VpjDrFuC3VNsh5SgTdZH63aLD6Xw=";
};
installPhase =
let
iniFormat = pkgs.formats.ini { };
configFile = iniFormat.generate "" { General = themeConfig; };
basePath = "$out/share/sddm/themes/sddm-aerial-theme";
in
''
mkdir -p ${basePath}
cp -r $src/* ${basePath}
''
+ lib.optionalString (themeConfig != null) ''
ln -sf ${configFile} ${basePath}/theme.conf.user
'';
}

View file

@ -1,7 +1,7 @@
{ pkgs }:
pkgs.stdenv.mkDerivation {
name = "sddm-theme";
name = "astronaut-sddm-theme";
src = pkgs.fetchFromGitHub {
owner = "gpskwlkr";
repo = "sddm-astronaut-theme";

View file

@ -0,0 +1,27 @@
{
pkgs,
...
}:
let
imageLink = "https://images.unsplash.com/photo-1507090960745-b32f65d3113a?ixlib=rb-4.0.3&q=85&fm=jpg&crop=entropy&cs=srgb&dl=matteo-catanese-PI8Hk-3ZcCU-unsplash.jpg&w=2400";
image = pkgs.fetchurl {
url = imageLink;
sha256 = "sha256-y0avQR9I8u2m0JEe/lcfLgHUDF1TDN029511yC6PhQE=";
};
in
pkgs.stdenv.mkDerivation {
name = "sddm-theme";
src = pkgs.fetchFromGitHub {
owner = "MarianArlt";
repo = "sddm-sugar-dark";
rev = "ceb2c455663429be03ba62d9f898c571650ef7fe";
sha256 = "0153z1kylbhc9d12nxy9vpn0spxgrhgy36wy37pk6ysq7akaqlvy";
};
installPhase = ''
mkdir -p $out
cp -R ./* $out/
cd $out/
rm Background.jpg
cp -r ${image} $out/Background.jpg
'';
}

View file

@ -1,11 +1,19 @@
{ pkgs, ... }:
let
themeConfig = {
bgVidDay = "playlist/day.m3u";
bgVidNight = "playlist/night.m3u";
};
in
{
services = {
displayManager = {
sddm.wayland.enable = true;
sddm.enable = true;
sddm.theme = "${import ./sddm-theme.nix { inherit pkgs; }}";
sddm.theme = "${pkgs.callPackage ./../../pkgs/sddm-themes/gruvbox.nix {
inherit pkgs themeConfig;
}}";
};
};
}

View file

@ -47,9 +47,6 @@
gh # Github cli tool
gnumake
lm_sensors
libsForQt5.qt5.qtquickcontrols2
libsForQt5.qt5.qtgraphicaleffects
libsForQt5.qt5.qtsvg
openssl
openssl.dev
pkg-config # Include Lib
@ -93,6 +90,15 @@
# Thumbnail
ffmpegthumbnailer
# SDDM
libsForQt5.qt5.qtmultimedia
libsForQt5.qt5.qtquickcontrols2
libsForQt5.qt5.qtgraphicaleffects
libsForQt5.qt5.qtsvg
pkgs.gst_all_1.gst-libav
pkgs.gst_all_1.gstreamer
pkgs.gst_all_1.gst-plugins-good
])
++ [
inputs.ghostty.packages.${system}.default