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; with lib;
let let
cfg = config.modules.displayManager; cfg = config.modules.display;
in in
{ {
config = mkIf (cfg.displayManager == "gdm") { config = mkIf (cfg.manager == "gdm") {
services.displayManager.gdm = { services.displayManager.gdm = {
enable = true; enable = true;
}; };

View File

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

View File

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

View File

@ -5,6 +5,17 @@
with lib; with lib;
{ {
options.modules.display = { options.modules.display = {
manager = mkOption {
type = types.enum [
"gdm"
"sddm"
];
default = "sddm";
description = ''
The display manager to use.
'';
};
scale = mkOption { scale = mkOption {
type = types.int; type = types.int;
default = 1; 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.plasma.enable = false;
modules.displayManager.displayManager = "gdm"; modules.display.manager = "gdm";
modules.localsend.enable = true; modules.localsend.enable = true;
@ -27,4 +27,4 @@
modules.discord.enable = true; modules.discord.enable = true;
modules.tailscale.enable = true; modules.tailscale.enable = true;
} }