add extraConfigs option to quickshell module

This commit is contained in:
jacekpoz 2024-04-15 21:49:19 +02:00
parent e386a95e02
commit 2141534e48
Signed by: poz
SSH key fingerprint: SHA256:JyLeVWE4bF3tDnFeUpUaJsPsNlJyBldDGV/dIKSLyN8

View file

@ -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)}
'';
};
};