refactor works on lio host
This commit is contained in:
parent
1d9c4beaf3
commit
f0c096edec
73 changed files with 2214 additions and 1091 deletions
30
common/desktop_environment/default.nix
Normal file
30
common/desktop_environment/default.nix
Normal file
|
@ -0,0 +1,30 @@
|
|||
{ 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);
|
||||
}
|
||||
)
|
||||
];
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue