templates/system/modules/ui/desktops/common.nix

51 lines
1 KiB
Nix
Raw Normal View History

# Common desktop environment modules
{
pkgs,
config,
lib,
...
}:
let
cfg = config.aux.ui.desktops;
in
{
options = {
aux.ui.desktops = {
enable = lib.mkEnableOption (lib.mdDoc "Enables base desktop environment support.");
xkb = lib.mkOption {
description = "The keyboard layout to use by default. Defaults to us.";
type = lib.types.attrs;
default = {
layout = "us";
variant = "";
};
};
};
};
config = lib.mkIf cfg.enable {
aux.ui.audio.enable = true;
services = {
# Configure the xserver
xserver = {
# Enable the X11 windowing system.
enable = true;
# Enable touchpad support (enabled by default in most desktop managers, buuuut just in case).
libinput.enable = true;
# Configure keymap in X11
xkb = config.aux.ui.desktops.xkb;
};
};
# Support for AppImage files
programs.appimage = {
enable = true;
binfmt = true;
};
};
}