38 lines
988 B
Nix
38 lines
988 B
Nix
{
|
|
flake.nixosModules.sddm = {
|
|
config,
|
|
lib,
|
|
...
|
|
}: let
|
|
cfg = config.hive.sddm;
|
|
in {
|
|
options.hive.sddm = with lib; {
|
|
enable = mkEnableOption "Enable SDDM display manager";
|
|
autologin = mkOption {
|
|
type = types.nullOr types.str;
|
|
default = null;
|
|
description = "The autologin username or null for no autologin.";
|
|
};
|
|
wayland = mkEnableOption "Enable Wayland session in SDDM";
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
services.xserver.enable = true;
|
|
services.xserver = {
|
|
xkb.layout = "de";
|
|
xkb.variant = "";
|
|
xkb.options = "caps:ctrl_modifier";
|
|
};
|
|
services.displayManager.autoLogin.enable = cfg.autologin != null;
|
|
services.displayManager.autoLogin.user = cfg.autologin;
|
|
|
|
services.libinput.enable = true;
|
|
services.dbus.enable = true;
|
|
services.displayManager.sddm = {
|
|
enable = true;
|
|
wayland.enable = cfg.wayland;
|
|
};
|
|
};
|
|
};
|
|
}
|