2024-12-23 01:46:52 -08:00
|
|
|
{
|
|
|
|
pkgs,
|
|
|
|
lib,
|
|
|
|
config,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
let
|
|
|
|
cfg = config.liminalOS.desktop;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
options.liminalOS.desktop = {
|
2024-12-25 19:47:59 -08:00
|
|
|
enable = lib.mkOption {
|
|
|
|
type = lib.types.bool;
|
|
|
|
default = config.liminalOS.enable;
|
|
|
|
description = ''
|
|
|
|
Whether to enable the liminalOS desktop environment.
|
|
|
|
'';
|
|
|
|
};
|
2024-12-23 01:46:52 -08:00
|
|
|
hyprland.enable = lib.mkOption {
|
|
|
|
type = lib.types.bool;
|
|
|
|
default = cfg.enable;
|
|
|
|
description = ''
|
|
|
|
Whether to enable Hyprland. Sets up a default configuration at the system and user level, and installs xdg-desktop-portal-gtk.
|
|
|
|
'';
|
|
|
|
};
|
2025-01-16 21:30:58 -08:00
|
|
|
niri.enable = lib.mkEnableOption "Niri compositor";
|
2024-12-23 01:46:52 -08:00
|
|
|
};
|
|
|
|
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
|
|
xdg.portal = lib.mkIf cfg.hyprland.enable {
|
|
|
|
enable = true;
|
|
|
|
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
|
|
|
|
};
|
|
|
|
|
|
|
|
programs.hyprland.enable = cfg.hyprland.enable;
|
2024-12-24 18:47:17 -08:00
|
|
|
|
2025-01-16 21:30:58 -08:00
|
|
|
programs.niri.enable = cfg.niri.enable;
|
|
|
|
|
|
|
|
programs.xwayland.enable = lib.mkIf cfg.niri.enable (lib.mkForce true);
|
|
|
|
|
2024-12-24 18:47:17 -08:00
|
|
|
services.xserver.enable = false;
|
|
|
|
|
|
|
|
services.xserver = {
|
|
|
|
xkb.layout = "us";
|
|
|
|
xkb.variant = "";
|
|
|
|
};
|
2024-12-23 01:46:52 -08:00
|
|
|
};
|
|
|
|
}
|