System Gen228 @ 2026-03-29-17:27:44 by jonas@comfy-station
This commit is contained in:
37
modules/desktop/sddm.nix
Normal file
37
modules/desktop/sddm.nix
Normal file
@@ -0,0 +1,37 @@
|
||||
{
|
||||
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;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user