base-graphical: add desktop manager config
This commit is contained in:
parent
aeab801602
commit
9e638c009f
4 changed files with 28 additions and 9 deletions
26
common/base-graphical/desktop.nix
Normal file
26
common/base-graphical/desktop.nix
Normal file
|
@ -0,0 +1,26 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
inherit (lib) mkIf mkOption types;
|
||||
cfg = config.qenya.base-graphical;
|
||||
|
||||
isGnome = cfg.desktop == "gnome";
|
||||
isPlasma6 = cfg.desktop == "plasma6";
|
||||
in
|
||||
{
|
||||
options.qenya.base-graphical.desktop = mkOption {
|
||||
type = types.enum [ "gnome" "plasma6" ];
|
||||
default = "gnome";
|
||||
example = "plasma6";
|
||||
description = "Which display manager and desktop manager to use.";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services.xserver.displayManager.gdm.enable = isGnome;
|
||||
services.xserver.desktopManager.gnome.enable = isGnome;
|
||||
|
||||
services.displayManager.sddm.enable = isPlasma6;
|
||||
services.displayManager.sddm.wayland.enable = isPlasma6;
|
||||
services.desktopManager.plasma6.enable = isPlasma6;
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue