base-graphical: add desktop manager config
This commit is contained in:
parent
aeab801602
commit
9e638c009f
|
@ -6,6 +6,7 @@ let
|
|||
in
|
||||
{
|
||||
imports = [
|
||||
./desktop.nix
|
||||
./sound.nix
|
||||
];
|
||||
|
||||
|
|
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;
|
||||
};
|
||||
}
|
|
@ -17,15 +17,11 @@
|
|||
};
|
||||
|
||||
qenya.base-graphical.enable = true;
|
||||
qenya.base-graphical.desktop = "plasma6";
|
||||
|
||||
time.timeZone = "Europe/London";
|
||||
|
||||
i18n.defaultLocale = "en_GB.UTF-8";
|
||||
console.keyMap = "uk";
|
||||
|
||||
services.displayManager.sddm.enable = true;
|
||||
services.displayManager.sddm.wayland.enable = true;
|
||||
services.desktopManager.plasma6.enable = true;
|
||||
services.xserver.xkb.layout = "gb";
|
||||
|
||||
services.printing.enable = true;
|
||||
|
|
|
@ -21,12 +21,8 @@
|
|||
qenya.base-graphical.enable = true;
|
||||
|
||||
time.timeZone = "Europe/London";
|
||||
|
||||
i18n.defaultLocale = "en_GB.UTF-8";
|
||||
console.keyMap = "uk";
|
||||
|
||||
services.xserver.displayManager.gdm.enable = true;
|
||||
services.xserver.desktopManager.gnome.enable = true;
|
||||
services.xserver.xkb.layout = "gb";
|
||||
|
||||
services.printing.enable = true;
|
||||
|
|
Loading…
Reference in a new issue