mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-01-31 04:58:01 +00:00
nixos/workflows: use private library
It's a private module now so it's fine.
This commit is contained in:
parent
f053a92a99
commit
173919dcf0
@ -1,7 +1,7 @@
|
||||
# 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.
|
||||
{ config, lib, pkgs, ... }:
|
||||
{ config, lib, pkgs, foodogsquaredLib, ... }:
|
||||
|
||||
let cfg = config.workflows;
|
||||
in {
|
||||
@ -24,10 +24,7 @@ in {
|
||||
assertions = [{
|
||||
assertion =
|
||||
let
|
||||
countAttrs = pred: attrs:
|
||||
lib.count (attr: pred attr.name attr.value)
|
||||
(lib.mapAttrsToList lib.nameValuePair attrs);
|
||||
enabledThemes = countAttrs (_: theme: theme.enable) cfg.workflows;
|
||||
enabledThemes = foodogsquaredLib.countAttrs (_: theme: theme.enable) cfg.workflows;
|
||||
in
|
||||
cfg.disableLimit || (enabledThemes <= 1);
|
||||
message = "Can't have more than one theme enabled at any given time.";
|
||||
|
Loading…
Reference in New Issue
Block a user