2021-11-25 11:55:30 +00:00
|
|
|
# Themes are your graphical sessions.
|
|
|
|
# It also contains your aesthetics even specific workflow and whatnots.
|
|
|
|
# You can also show your desktop being modularized like this.
|
2023-10-02 06:26:11 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
2020-08-16 08:33:44 +00:00
|
|
|
|
2022-08-23 10:24:44 +00:00
|
|
|
let cfg = config.workflows;
|
2021-12-25 12:32:52 +00:00
|
|
|
in {
|
2022-08-23 10:24:44 +00:00
|
|
|
options.workflows.disableLimit = lib.mkOption {
|
2021-12-25 12:32:52 +00:00
|
|
|
type = lib.types.bool;
|
|
|
|
default = false;
|
|
|
|
description = ''
|
2022-08-23 10:24:44 +00:00
|
|
|
Whether to unlock the limit for workflows. Since workflows may overlap
|
|
|
|
with packages and configurations, this should be enabled at your own
|
|
|
|
risk.
|
2021-12-25 12:32:52 +00:00
|
|
|
'';
|
|
|
|
};
|
2020-10-20 15:56:10 +00:00
|
|
|
|
2022-11-25 05:37:17 +00:00
|
|
|
imports = [
|
|
|
|
./a-happy-gnome
|
|
|
|
./knome
|
|
|
|
];
|
2021-12-25 12:32:52 +00:00
|
|
|
|
|
|
|
config = {
|
|
|
|
assertions = [{
|
|
|
|
assertion =
|
2024-02-11 07:16:25 +00:00
|
|
|
let
|
|
|
|
countAttrs = pred: attrs:
|
|
|
|
lib.count (attr: pred attr.name attr.value)
|
|
|
|
(lib.mapAttrsToList lib.nameValuePair attrs);
|
|
|
|
enabledThemes = countAttrs (_: theme: theme.enable) cfg.workflows;
|
2022-02-04 12:43:42 +00:00
|
|
|
in cfg.disableLimit || (enabledThemes <= 1);
|
2021-12-25 12:32:52 +00:00
|
|
|
message = "Can't have more than one theme enabled at any given time.";
|
|
|
|
}];
|
|
|
|
};
|
2020-08-16 08:33:44 +00:00
|
|
|
}
|