dotfiles/common/desktop_environment/default.nix
RingOfStorms (Joshua Bell) f0c096edec refactor works on lio host
2025-03-18 11:53:54 -05:00

30 lines
642 B
Nix

{ config, lib, ... }:
let
ccfg = import ../config.nix;
cfg = config.${ccfg.custom_config_key}.desktopEnvironment;
in
{
imports = [
./gnome
];
config = {
assertions = [
(
let
enabledDEs = lib.filter (x: x.enabled) [
{
name = "gnome";
enabled = cfg.gnome.enable;
}
];
in
{
assertion = lib.length enabledDEs <= 1;
message =
"Only one desktop environment can be enabled at a time. Enabled: "
+ lib.concatStringsSep ", " (map (x: x.name) enabledDEs);
}
)
];
};
}