feat(sddm): Catppuccin -> Rose Pine
Some checks are pending
CI / Format Nix files (push) Waiting to run
CI / Test Modules (push) Waiting to run
CI / Validate sources (push) Waiting to run
Release / Make release (push) Waiting to run
Release / Publish to Flake registries (push) Blocked by required conditions
Build & deploy website / Deploy website (push) Blocked by required conditions
Build & deploy website / Build site (push) Waiting to run
Some checks are pending
CI / Format Nix files (push) Waiting to run
CI / Test Modules (push) Waiting to run
CI / Validate sources (push) Waiting to run
Release / Make release (push) Waiting to run
Release / Publish to Flake registries (push) Blocked by required conditions
Build & deploy website / Deploy website (push) Blocked by required conditions
Build & deploy website / Build site (push) Waiting to run
This commit is contained in:
parent
f9fc888913
commit
f89d1c0f41
2 changed files with 41 additions and 70 deletions
|
@ -300,6 +300,18 @@
|
|||
"url": "https://github.com/d2718nis/rose-pine-swaylock/archive/8a2aefbc9996941535bb10f0df5357687c43c06a.tar.gz",
|
||||
"hash": "15inlf8j6vn5k9d71lzmxsrqn55qha1idmpxbk4v1ji0sywrw1f6"
|
||||
},
|
||||
"sddm-rose-pine": {
|
||||
"type": "Git",
|
||||
"repository": {
|
||||
"type": "GitHub",
|
||||
"owner": "lwndhrst",
|
||||
"repo": "sddm-rose-pine"
|
||||
},
|
||||
"branch": "master",
|
||||
"revision": "e8735051bf4a418efaf076f52cb3d7873ccd1509",
|
||||
"url": "https://github.com/lwndhrst/sddm-rose-pine/archive/e8735051bf4a418efaf076f52cb3d7873ccd1509.tar.gz",
|
||||
"hash": "1vdmxjkacv5il8gpdxgw7zbmy442b9wrv47az3yw1wwwd8wr6pzl"
|
||||
},
|
||||
"starship": {
|
||||
"type": "Git",
|
||||
"repository": {
|
||||
|
|
|
@ -1,81 +1,40 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib)
|
||||
mkIf
|
||||
ctp
|
||||
types
|
||||
mkOption
|
||||
;
|
||||
cfg = config.services.displayManager.sddm.catppuccin;
|
||||
}: let
|
||||
inherit (config.rose-pine) sources;
|
||||
cfg = config.services.displayManager.sddm.rose-pine;
|
||||
enable = cfg.enable && config.services.displayManager.sddm.enable;
|
||||
in
|
||||
in {
|
||||
options.services.displayManager.sddm.rose-pine = lib.rp.mkRosePineOpt {name = "sddm";};
|
||||
|
||||
{
|
||||
options.services.displayManager.sddm.catppuccin = ctp.mkCatppuccinOpt { name = "sddm"; } // {
|
||||
font = mkOption {
|
||||
type = types.str;
|
||||
default = "Noto Sans";
|
||||
description = "Font to use for the login screen";
|
||||
};
|
||||
|
||||
fontSize = mkOption {
|
||||
type = types.str;
|
||||
default = "9";
|
||||
description = "Font size to use for the login screen";
|
||||
};
|
||||
|
||||
background = mkOption {
|
||||
type = with types; (either path str);
|
||||
default = "";
|
||||
description = "Background image to use for the login screen";
|
||||
};
|
||||
|
||||
loginBackground = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = "Add an additional background layer to the login panel";
|
||||
};
|
||||
|
||||
assertQt6Sddm =
|
||||
lib.mkEnableOption ''
|
||||
checking if `services.displayManager.sddm.package` is the Qt 6 version.
|
||||
|
||||
This is to ensure the theme is applied properly, but may have false positives in the case of overridden packages for example
|
||||
''
|
||||
// {
|
||||
default = true;
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf enable {
|
||||
assertions = lib.optional cfg.assertQt6Sddm {
|
||||
assertion = config.services.displayManager.sddm.package == pkgs.kdePackages.sddm;
|
||||
message = ''
|
||||
Only the Qt 6 version of SDDM is supported by this port!
|
||||
|
||||
In most cases this can be resolved by setting `services.displayManager.sddm.package`
|
||||
to `pkgs.kdePackages.sddm`. If you know what you're doing and wish to disable this check,
|
||||
please set `services.displayManager.sddm.catppuccin.assertQt6Sddm` to `false`
|
||||
'';
|
||||
};
|
||||
|
||||
services.displayManager.sddm.theme = "catppuccin-${cfg.flavor}";
|
||||
config = lib.mkIf enable {
|
||||
services.displayManager.sddm.theme = "rose-pine";
|
||||
|
||||
environment.systemPackages = [
|
||||
(pkgs.catppuccin-sddm.override {
|
||||
inherit (cfg)
|
||||
flavor
|
||||
font
|
||||
fontSize
|
||||
background
|
||||
loginBackground
|
||||
;
|
||||
})
|
||||
(
|
||||
{
|
||||
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
|
||||
'';
|
||||
}
|
||||
)
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue