47 lines
1.3 KiB
Nix
47 lines
1.3 KiB
Nix
{
|
|
config,
|
|
inputs,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}: 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";
|
|
|
|
enabledConfigs = mkOption {
|
|
description = "enabled configs out of the defaults";
|
|
type = with types; listOf str;
|
|
default = [];
|
|
};
|
|
|
|
extraConfigs = mkOption {
|
|
description = "extra configs (no need to enable these)";
|
|
type = with types; attrsOf path;
|
|
default = {};
|
|
};
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
home-manager.users.${username} = {
|
|
home.packages = with pkgs; [
|
|
inputs.quickshell.packages.${pkgs.system}.default
|
|
# for da poz
|
|
qt6.qtsvg
|
|
];
|
|
|
|
xdg.configFile."quickshell/manifest.conf".text = ''
|
|
${concatStrings (mapAttrsToList (name: value: ''
|
|
${name} = ${value}
|
|
'') ((lib.filterAttrs (name: _: elem name cfg.enabledConfigs) defaultConfigs) // cfg.extraConfigs))}
|
|
'';
|
|
};
|
|
};
|
|
}
|