fix: sddm theme
This commit is contained in:
parent
fc9b14e0d2
commit
d273765b99
9 changed files with 65 additions and 106 deletions
|
|
@ -4,7 +4,12 @@
|
|||
}:
|
||||
let
|
||||
inherit (pkgs) writeShellScript;
|
||||
inherit (lib) replaceString optionalString;
|
||||
inherit (lib)
|
||||
replaceString
|
||||
optionalString
|
||||
toUpper
|
||||
substring
|
||||
;
|
||||
inherit (builtins) toJSON;
|
||||
in
|
||||
{
|
||||
|
|
@ -91,4 +96,6 @@ in
|
|||
// conf
|
||||
);
|
||||
};
|
||||
|
||||
capitalize = text: "${toUpper (substring 0 1 text)}${substring 1 (-1) text}";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,22 +1,27 @@
|
|||
{
|
||||
pkgs,
|
||||
osConfig,
|
||||
helper,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (osConfig.systemConf) username;
|
||||
inherit (helper) capitalize;
|
||||
zenNebula = pkgs.fetchFromGitHub {
|
||||
owner = "justadumbprsn";
|
||||
repo = "zen-nebula";
|
||||
rev = "main";
|
||||
sha256 = "sha256-f4J5ob/apKhxERUSvXE8QHMMsKJCQFRoMSo/Pw4LgTg=";
|
||||
};
|
||||
profileName = capitalize username;
|
||||
in
|
||||
{
|
||||
programs.zen-browser = {
|
||||
enable = true;
|
||||
profiles = {
|
||||
"Danny Profile" = {
|
||||
"${profileName} Profile" = {
|
||||
default = true;
|
||||
name = "Danny";
|
||||
name = username;
|
||||
settings = {
|
||||
"zen.view.compact.should-enable-at-startup" = true;
|
||||
"zen.widget.linux.transparency" = true;
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
inputs,
|
||||
system,
|
||||
config,
|
||||
pkgs,
|
||||
helper,
|
||||
lib,
|
||||
...
|
||||
|
|
@ -40,6 +41,12 @@ let
|
|||
};
|
||||
};
|
||||
};
|
||||
|
||||
defaultSddmTheme = (
|
||||
pkgs.sddm-astronaut.override {
|
||||
embeddedTheme = "purple_leaves.conf";
|
||||
}
|
||||
);
|
||||
in
|
||||
{
|
||||
options.systemConf = {
|
||||
|
|
@ -59,6 +66,19 @@ in
|
|||
description = "Main username";
|
||||
};
|
||||
|
||||
sddm = {
|
||||
theme = mkOption {
|
||||
type = types.str;
|
||||
description = "sddm theme name";
|
||||
default = "sddm-astronaut-theme";
|
||||
};
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = defaultSddmTheme;
|
||||
description = "sddm theme package";
|
||||
};
|
||||
};
|
||||
|
||||
hyprland = {
|
||||
enable = (mkEnableOption "Enable hyprland") // {
|
||||
default = false;
|
||||
|
|
|
|||
|
|
@ -1,33 +0,0 @@
|
|||
{
|
||||
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
|
||||
'';
|
||||
|
||||
}
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
{ pkgs }:
|
||||
|
||||
pkgs.stdenv.mkDerivation {
|
||||
name = "astronaut-sddm-theme";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "gpskwlkr";
|
||||
repo = "sddm-astronaut-theme";
|
||||
rev = "468a100460d5feaa701c2215c737b55789cba0fc";
|
||||
sha256 = "1h20b7n6a4pbqnrj22y8v5gc01zxs58lck3bipmgkpyp52ip3vig";
|
||||
};
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
cp -R ./* $out/
|
||||
'';
|
||||
}
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
{
|
||||
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
|
||||
'';
|
||||
}
|
||||
|
|
@ -4,10 +4,12 @@
|
|||
inputs,
|
||||
pkgs,
|
||||
config,
|
||||
helper,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (helper) capitalize;
|
||||
username = "danny";
|
||||
in
|
||||
{
|
||||
|
|
@ -20,16 +22,27 @@ in
|
|||
monitors = [
|
||||
{
|
||||
desc = "ASUSTek COMPUTER INC ASUS VG32VQ1B 0x00002271";
|
||||
output = "DP-6";
|
||||
output = "DP-5";
|
||||
props = "2560x1440@165, 0x0, 1";
|
||||
}
|
||||
{
|
||||
desc = "Acer Technologies XV272U V3 1322131231233";
|
||||
output = "DP-5";
|
||||
output = "DP-6";
|
||||
props = "2560x1440@180, -1440x-600, 1, transform, 1";
|
||||
}
|
||||
];
|
||||
};
|
||||
sddm.package = (
|
||||
pkgs.sddm-astronaut.override {
|
||||
embeddedTheme = "purple_leaves";
|
||||
themeConfig = {
|
||||
ScreenWidth = "2560";
|
||||
ScreenHeight = "1440";
|
||||
Font = "SF Pro Display Bold";
|
||||
HeaderText = "Welcome, ${capitalize username}";
|
||||
};
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPortRanges = [
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
let
|
||||
inherit (lib) optionalString;
|
||||
inherit (config.systemConf) username;
|
||||
inherit (config.systemConf.hyprland) monitors;
|
||||
in
|
||||
{
|
||||
home-manager.users."${username}" = {
|
||||
|
|
@ -20,7 +21,7 @@ in
|
|||
settings = [
|
||||
# monitor 1
|
||||
{
|
||||
output = "DP-6";
|
||||
output = "${(builtins.elemAt monitors 0).output}";
|
||||
height = 48;
|
||||
modules-left = [
|
||||
"custom/os"
|
||||
|
|
@ -47,7 +48,7 @@ in
|
|||
}
|
||||
# monitor 2
|
||||
{
|
||||
output = "DP-5";
|
||||
output = "${(builtins.elemAt monitors 1).output}";
|
||||
height = 54;
|
||||
modules-left = [
|
||||
"clock"
|
||||
|
|
|
|||
|
|
@ -1,31 +1,19 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{ pkgs, config, ... }:
|
||||
let
|
||||
themeConfig = {
|
||||
bgVidDay = "playlist/day.m3u";
|
||||
bgVidNight = "playlist/night.m3u";
|
||||
};
|
||||
inherit (config.systemConf.sddm) theme package;
|
||||
in
|
||||
{
|
||||
services = {
|
||||
displayManager = {
|
||||
sddm.wayland.enable = true;
|
||||
sddm.enable = true;
|
||||
sddm.theme = "${pkgs.callPackage ./../../pkgs/sddm-themes/gruvbox.nix {
|
||||
inherit pkgs themeConfig;
|
||||
}}";
|
||||
};
|
||||
services.displayManager.sddm = {
|
||||
enable = true;
|
||||
wayland.enable = true;
|
||||
theme = theme;
|
||||
settings.Theme.Current = theme;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
# SDDM
|
||||
libsForQt5.qt5.qtmultimedia
|
||||
libsForQt5.qt5.qtquickcontrols2
|
||||
libsForQt5.qt5.qtgraphicaleffects
|
||||
libsForQt5.qt5.qtsvg
|
||||
libsForQt5.qt5.qtwayland
|
||||
pkgs.gst_all_1.gst-libav
|
||||
pkgs.gst_all_1.gstreamer
|
||||
pkgs.gst_all_1.gst-plugins-good
|
||||
environment.systemPackages = with pkgs.kdePackages; [
|
||||
package
|
||||
qtmultimedia
|
||||
qtbase
|
||||
qtwayland
|
||||
];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue