Consolidate displayManager module options under the new display module options, and include the choices as enums

This commit is contained in:
Joshua Yuen 2026-09-11 23:26:14 -04:00
parent 0f030fd0ca
commit fc2359c215
Signed by: josh
GPG Key ID: 530DA0331EFE99F5
6 changed files with 17 additions and 26 deletions

View File

@ -5,10 +5,10 @@
}:
with lib;
let
cfg = config.modules.displayManager;
cfg = config.modules.display;
in
{
config = mkIf (cfg.displayManager == "gdm") {
config = mkIf (cfg.manager == "gdm") {
services.displayManager.gdm = {
enable = true;
};

View File

@ -5,10 +5,10 @@
}:
with lib;
let
cfg = config.modules.displayManager;
cfg = config.modules.display;
in
{
config = mkIf (cfg.displayManager == "sddm") {
config = mkIf (cfg.manager == "sddm") {
services.displayManager.sddm = {
enable = true;
wayland.enable = true;

View File

@ -5,7 +5,6 @@
imports = [
./discord.nix
./display.nix
./displayManager.nix
./gnomeBoxes.nix
./gpg.nix
./hyprland.nix

View File

@ -5,6 +5,17 @@
with lib;
{
options.modules.display = {
manager = mkOption {
type = types.enum [
"gdm"
"sddm"
];
default = "sddm";
description = ''
The display manager to use.
'';
};
scale = mkOption {
type = types.int;
default = 1;

View File

@ -1,19 +0,0 @@
{
lib,
...
}:
with lib;
{
options.modules.displayManager = {
displayManager = mkOption {
type = types.enum [
"gdm"
"sddm"
];
default = "sddm";
description = ''
The display manager to use.
'';
};
};
}

View File

@ -15,7 +15,7 @@
];
};
modules.plasma.enable = false;
modules.displayManager.displayManager = "gdm";
modules.display.manager = "gdm";
modules.localsend.enable = true;