mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-02-07 12:19:07 +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.
|
# Themes are your graphical sessions.
|
||||||
# It also contains your aesthetics even specific workflow and whatnots.
|
# It also contains your aesthetics even specific workflow and whatnots.
|
||||||
# You can also show your desktop being modularized like this.
|
# You can also show your desktop being modularized like this.
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, foodogsquaredLib, ... }:
|
||||||
|
|
||||||
let cfg = config.workflows;
|
let cfg = config.workflows;
|
||||||
in {
|
in {
|
||||||
@ -24,10 +24,7 @@ in {
|
|||||||
assertions = [{
|
assertions = [{
|
||||||
assertion =
|
assertion =
|
||||||
let
|
let
|
||||||
countAttrs = pred: attrs:
|
enabledThemes = foodogsquaredLib.countAttrs (_: theme: theme.enable) cfg.workflows;
|
||||||
lib.count (attr: pred attr.name attr.value)
|
|
||||||
(lib.mapAttrsToList lib.nameValuePair attrs);
|
|
||||||
enabledThemes = countAttrs (_: theme: theme.enable) cfg.workflows;
|
|
||||||
in
|
in
|
||||||
cfg.disableLimit || (enabledThemes <= 1);
|
cfg.disableLimit || (enabledThemes <= 1);
|
||||||
message = "Can't have more than one theme enabled at any given time.";
|
message = "Can't have more than one theme enabled at any given time.";
|
||||||
|
Loading…
Reference in New Issue
Block a user