42 lines
913 B
Nix
42 lines
913 B
Nix
{
|
|
config,
|
|
lib,
|
|
...
|
|
}: let
|
|
cfg = config.desktop.dm;
|
|
in {
|
|
options.desktop.dm = with lib; {
|
|
name = mkOption {
|
|
type = types.nullOr (types.enum ["sddm" "gdm"]);
|
|
default = null;
|
|
description = "The display manager to use.";
|
|
};
|
|
autologin = mkOption {
|
|
type = types.nullOr types.str;
|
|
default = null;
|
|
description = "The autologin username or null for no autologin.";
|
|
};
|
|
wayland = mkOption {
|
|
type = types.bool;
|
|
default = false;
|
|
description = "Enable wayland";
|
|
};
|
|
};
|
|
|
|
imports = [
|
|
./gdm.nix
|
|
./sddm.nix
|
|
];
|
|
|
|
config = {
|
|
services.xserver.enable = true;
|
|
services.xserver = {
|
|
layout = "de";
|
|
xkbVariant = "";
|
|
xkbOptions = "caps:ctrl_modifier";
|
|
};
|
|
services.xserver.displayManager.autoLogin.enable = cfg.autologin != null;
|
|
services.xserver.displayManager.autoLogin.user = cfg.autologin;
|
|
};
|
|
}
|