diff --git a/pkgs/sddm-themes/aerial.nix b/pkgs/sddm-themes/aerial.nix new file mode 100644 index 0000000..fe0c46b --- /dev/null +++ b/pkgs/sddm-themes/aerial.nix @@ -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 + ''; + +} diff --git a/system/modules/sddm-theme.nix b/pkgs/sddm-themes/astronaut.nix similarity index 90% rename from system/modules/sddm-theme.nix rename to pkgs/sddm-themes/astronaut.nix index f372c18..6e7d412 100644 --- a/system/modules/sddm-theme.nix +++ b/pkgs/sddm-themes/astronaut.nix @@ -1,7 +1,7 @@ { pkgs }: pkgs.stdenv.mkDerivation { - name = "sddm-theme"; + name = "astronaut-sddm-theme"; src = pkgs.fetchFromGitHub { owner = "gpskwlkr"; repo = "sddm-astronaut-theme"; diff --git a/pkgs/sddm-themes/gruvbox.nix b/pkgs/sddm-themes/gruvbox.nix new file mode 100644 index 0000000..19c134f --- /dev/null +++ b/pkgs/sddm-themes/gruvbox.nix @@ -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 + ''; +} diff --git a/system/modules/display-manager.nix b/system/modules/display-manager.nix index 169702c..ef0ccb0 100644 --- a/system/modules/display-manager.nix +++ b/system/modules/display-manager.nix @@ -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; + }}"; }; }; } diff --git a/system/modules/packages.nix b/system/modules/packages.nix index 9fdb3af..c5d0f89 100644 --- a/system/modules/packages.nix +++ b/system/modules/packages.nix @@ -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