From 2141534e482ff2a069af77f8da3214049d046341 Mon Sep 17 00:00:00 2001 From: jacekpoz Date: Mon, 15 Apr 2024 21:49:19 +0200 Subject: [PATCH] add extraConfigs option to quickshell module --- modules/gui/quickshell/default.nix | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/modules/gui/quickshell/default.nix b/modules/gui/quickshell/default.nix index 6407bcd..fd51a4d 100644 --- a/modules/gui/quickshell/default.nix +++ b/modules/gui/quickshell/default.nix @@ -7,9 +7,20 @@ }: with lib; let cfg = config.myOptions.programs.quickshell; inherit (config.myOptions.other.system) username; + + defaultConfigs = { + powermenu = ./powermenu; + poz = ./poz; + }; in { options.myOptions.programs.quickshell = { enable = mkEnableOption "quickshell"; + + extraConfigs = mkOption { + description = "extra modules (no need to enable these)"; + type = with types; attrsOf path; + default = {}; + }; }; config = mkIf cfg.enable { @@ -21,8 +32,9 @@ in { ]; xdg.configFile."quickshell/manifest.conf".text = '' - powermenu = ${./powermenu} - poz = ${./poz} + ${concatStrings (mapAttrsToList (name: value: '' + ${name} = ${value} + '') defaultConfigs // cfg.extraConfigs)} ''; }; };