mirror of
https://github.com/youwen5/liminalOS.git
synced 2025-06-20 05:59:51 -07:00
refactor: modularize hyprland and desktop environment configurations
This commit is contained in:
parent
3e93fc2b92
commit
c3fa2197cb
4 changed files with 32 additions and 12 deletions
30
modules/linux/desktop-environment/default.nix
Normal file
30
modules/linux/desktop-environment/default.nix
Normal file
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
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;
|
||||
};
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
extraPortals = with pkgs; [ xdg-desktop-portal-gtk ];
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue