If I can find out how to make it work without the double definition

i'll be happy
This commit is contained in:
Noa Aarts 2024-04-05 13:58:29 +02:00
parent 47fa902c75
commit f350f26baf
6 changed files with 13 additions and 9 deletions

View file

@ -1,8 +1,6 @@
{ config, pkgs, lib, ... }:
let
cfg = config.modules.waybar;
ifIsDef = name: builtins.any (row: builtins.any (x: x == name) row) (with cfg.modules; [left center right]);
in
{
options.modules.waybar = {
@ -42,10 +40,7 @@ in
];
config = lib.mkIf cfg.enable {
modules.waybar = {
clock.enable = ifIsDef "clock";
"hyprland/workspaces".enable = ifIsDef "hyprland/workspaces";
};
modules.waybar = import ./createmodules.nix cfg.modules;
home.packages = with pkgs; [
font-awesome
];