mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-24 21:42:51 -05:00
Add nix home-manager option for adding plugins (#354)
* add plugins nix hm option * add nix hm plugins option usage to readme
This commit is contained in:
committed by
GitHub
parent
c12eafa1db
commit
2a72c126f1
@@ -54,6 +54,23 @@ in {
|
||||
quickshell = {
|
||||
package = lib.mkPackageOption pkgs "quickshell" {};
|
||||
};
|
||||
plugins = lib.mkOption {
|
||||
type = attrsOf (types.submodule ({ config, ... }: {
|
||||
options = {
|
||||
enable = lib.mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = "Whether to link this plugin";
|
||||
};
|
||||
src = lib.mkOption {
|
||||
type = types.path;
|
||||
description = "Source to link to DMS plugins directory";
|
||||
};
|
||||
};
|
||||
}));
|
||||
default = {};
|
||||
description = "DMS Plugins to install";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable
|
||||
@@ -73,6 +90,11 @@ in {
|
||||
};
|
||||
};
|
||||
|
||||
xdg.configFile = lib.mapAttrs' (name: plugin: {
|
||||
name = "DankMaterialShell/plugins/${name}";
|
||||
value.source = plugin.src;
|
||||
}) (lib.filterAttrs (n: v: v.enable) cfg.plugins);
|
||||
|
||||
home.packages =
|
||||
[
|
||||
pkgs.material-symbols
|
||||
|
||||
Reference in New Issue
Block a user