mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-24 21:42:51 -05:00
nix: let paths be used instead of only packages in plugins (#988)
This commit is contained in:
@@ -72,10 +72,10 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
xdg.configFile = lib.mkMerge [
|
xdg.configFile = lib.mkMerge [
|
||||||
(lib.mapAttrs' (name: plugin: {
|
(lib.mapAttrs' (name: value: {
|
||||||
name = "DankMaterialShell/plugins/${name}";
|
name = "DankMaterialShell/plugins/${name}";
|
||||||
value.source = plugin.src;
|
inherit value;
|
||||||
}) (lib.filterAttrs (n: v: v.enable) cfg.plugins))
|
}) common.plugins)
|
||||||
{
|
{
|
||||||
"DankMaterialShell/default-settings.json" = lib.mkIf (cfg.default.settings != { }) {
|
"DankMaterialShell/default-settings.json" = lib.mkIf (cfg.default.settings != { }) {
|
||||||
source = jsonFormat.generate "default-settings.json" cfg.default.settings;
|
source = jsonFormat.generate "default-settings.json" cfg.default.settings;
|
||||||
|
|||||||
@@ -39,6 +39,11 @@ in
|
|||||||
|
|
||||||
environment.systemPackages = [ cfg.quickshell.package ] ++ common.packages;
|
environment.systemPackages = [ cfg.quickshell.package ] ++ common.packages;
|
||||||
|
|
||||||
|
environment.etc = lib.mapAttrs' (name: value: {
|
||||||
|
name = "xdg/quickshell/dms-plugins/${name}";
|
||||||
|
inherit value;
|
||||||
|
}) common.plugins;
|
||||||
|
|
||||||
services.power-profiles-daemon.enable = lib.mkDefault true;
|
services.power-profiles-daemon.enable = lib.mkDefault true;
|
||||||
services.accounts-daemon.enable = lib.mkDefault true;
|
services.accounts-daemon.enable = lib.mkDefault true;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ in
|
|||||||
description = "Whether to enable this plugin";
|
description = "Whether to enable this plugin";
|
||||||
};
|
};
|
||||||
src = lib.mkOption {
|
src = lib.mkOption {
|
||||||
type = types.package;
|
type = types.either types.package types.path;
|
||||||
description = "Source of the plugin package or path";
|
description = "Source of the plugin package or path";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user