mirror of
https://github.com/youwen5/nixos.git
synced 2025-01-18 13:12:10 -08:00
31 lines
708 B
Nix
31 lines
708 B
Nix
|
{
|
||
|
pkgs,
|
||
|
lib,
|
||
|
config,
|
||
|
...
|
||
|
}:
|
||
|
let
|
||
|
cfg = config.liminalOS.desktop;
|
||
|
in
|
||
|
{
|
||
|
options.liminalOS.desktop = {
|
||
|
enable = lib.mkEnableOption "liminalOS desktop environment with Hyprland and other utilities";
|
||
|
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.
|
||
|
'';
|
||
|
};
|
||
|
};
|
||
|
|
||
|
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;
|
||
|
};
|
||
|
}
|