Add gdm gnome sddm kde

This commit is contained in:
DashieTM 2024-08-30 18:16:42 +02:00
parent 4cd9e462d8
commit 4123f8ccac
7 changed files with 183 additions and 3 deletions

34
modules/programs/gdm.nix Normal file
View file

@ -0,0 +1,34 @@
{
lib,
options,
config,
...
}:
{
options.mods.gdm = {
enable = lib.mkOption {
default = false;
example = true;
type = lib.types.bool;
description = "Enables the gdm displayManager";
};
extraOptions = lib.mkOption {
default = { };
example = { };
type = with lib.types; attrsOf anything;
description = "Extra options to be applied to the gnome config";
};
};
config = lib.mkIf config.mods.gdm.enable (
lib.optionalAttrs (options ? services.xserver.displayManager.gdm) (
{
services.xserver.enable = true;
services.xserver.displayManager.gdm.enable = true;
}
// {
services.xserver.displayManager.gdm = config.mods.gdm.extraOptions;
}
)
);
}