base-graphical/desktop: refactor
This commit is contained in:
parent
d7142d8619
commit
58109130e6
|
@ -1,11 +1,8 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (lib) mkIf mkOption types;
|
inherit (lib) mkIf mkMerge mkOption types;
|
||||||
cfg = config.qenya.base-graphical;
|
cfg = config.qenya.base-graphical;
|
||||||
|
|
||||||
isGnome = cfg.desktop == "gnome";
|
|
||||||
isPlasma6 = cfg.desktop == "plasma6";
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.qenya.base-graphical.desktop = mkOption {
|
options.qenya.base-graphical.desktop = mkOption {
|
||||||
|
@ -15,12 +12,24 @@ in
|
||||||
description = "Which display manager and desktop manager to use.";
|
description = "Which display manager and desktop manager to use.";
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable (mkMerge [
|
||||||
services.xserver.displayManager.gdm.enable = isGnome;
|
(mkIf (cfg.desktop == "gnome") {
|
||||||
services.xserver.desktopManager.gnome.enable = isGnome;
|
services.xserver.displayManager.gdm.enable = true;
|
||||||
|
services.xserver.desktopManager.gnome.enable = true;
|
||||||
services.displayManager.sddm.enable = isPlasma6;
|
# TODO: agree on this with randomcat as it affects her too, since for some reason this is system-wide
|
||||||
services.displayManager.sddm.wayland.enable = isPlasma6;
|
# environment.gnome.excludePackages = with pkgs.gnome; [
|
||||||
services.desktopManager.plasma6.enable = isPlasma6;
|
# pkgs.gnome-tour
|
||||||
};
|
# epiphany # GNOME Web
|
||||||
|
# geary
|
||||||
|
# gnome-calendar
|
||||||
|
# gnome-contacts
|
||||||
|
# gnome-music
|
||||||
|
# ];
|
||||||
|
})
|
||||||
|
(mkIf (cfg.desktop == "plasma6") {
|
||||||
|
services.displayManager.sddm.enable = true;
|
||||||
|
services.displayManager.sddm.wayland.enable = true;
|
||||||
|
services.desktopManager.plasma6.enable = true;
|
||||||
|
})
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue