1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-04-15 02:02:08 -04:00

nix: add package option for dms-shell (#1864)

... to make it configurable.
This commit is contained in:
İlkecan Bozdoğan
2026-02-28 07:07:01 +03:00
committed by bbedward
parent 1f64bb8031
commit 8697840d46
5 changed files with 24 additions and 10 deletions

View File

@@ -8,6 +8,7 @@
let
inherit (lib) types;
cfg = config.programs.dank-material-shell.greeter;
cfgDms = config.programs.dank-material-shell;
inherit (config.services.greetd.settings.default_session) user;
@@ -30,13 +31,13 @@ let
lib.escapeShellArgs (
[
"sh"
"${../../quickshell/Modules/Greetd/assets/dms-greeter}"
"${cfg.package}/share/quickshell/dms/Modules/Greetd/assets/dms-greeter"
"--cache-dir"
cacheDir
"--command"
cfg.compositor.name
"-p"
"${dmsPkgs.dms-shell}/share/quickshell/dms"
"${cfg.package}/share/quickshell/dms"
]
++ lib.optionals (cfg.compositor.customConfig != "") [
"-C"
@@ -66,6 +67,21 @@ in
options.programs.dank-material-shell.greeter = {
enable = lib.mkEnableOption "DankMaterialShell greeter";
package = lib.mkOption {
type = types.package;
default = if cfgDms.enable or false then cfgDms.package else dmsPkgs.dms-shell;
defaultText = lib.literalExpression ''
if config.programs.dank-material-shell.enable
then config.programs.dank-material-shell.package
else built from source;
'';
description = ''
The DankMaterialShell package to use for the greeter.
Defaults to the package from `programs.dank-material-shell` if it is enabled,
otherwise defaults to building from source.
'';
};
compositor.name = lib.mkOption {
type = types.enum [
"niri"