modularize desktop components
This commit is contained in:
8
modules/desktop/de/default.nix
Normal file
8
modules/desktop/de/default.nix
Normal file
@@ -0,0 +1,8 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./hyprland.nix
|
||||
./plasma.nix
|
||||
];
|
||||
}
|
||||
22
modules/desktop/de/hyprland.nix
Normal file
22
modules/desktop/de/hyprland.nix
Normal file
@@ -0,0 +1,22 @@
|
||||
{ lib, config, ... }:
|
||||
|
||||
let
|
||||
cfg = config.desktop.de.hyprland;
|
||||
in
|
||||
{
|
||||
options.desktop.de.hyprland = {
|
||||
enable = lib.mkEnableOption "enable hyprland desktop environment";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services = {
|
||||
xserver.libinput.enable = true;
|
||||
dbus.enable = true;
|
||||
};
|
||||
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
xwayland.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
14
modules/desktop/de/plasma.nix
Normal file
14
modules/desktop/de/plasma.nix
Normal file
@@ -0,0 +1,14 @@
|
||||
{ config, lib, ... }:
|
||||
|
||||
let
|
||||
cfg = config.desktop.de.plasma;
|
||||
in
|
||||
{
|
||||
options.desktop.de.plasma = {
|
||||
enable = lib.mkEnableOption "Enable Plasma desktop environment with sddm";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.xserver.desktopManager.plasma5.enable = true;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user