From 89dcd72d703d525d2034f616ecf19823d5f50457 Mon Sep 17 00:00:00 2001 From: Lucas <43530291+LuckShiba@users.noreply.github.com> Date: Thu, 11 Dec 2025 19:57:22 -0300 Subject: [PATCH] nix: let paths be used instead of only packages in plugins (#988) --- distro/nix/home.nix | 6 +++--- distro/nix/nixos.nix | 5 +++++ distro/nix/options.nix | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/distro/nix/home.nix b/distro/nix/home.nix index acd579da..30d50b64 100644 --- a/distro/nix/home.nix +++ b/distro/nix/home.nix @@ -72,10 +72,10 @@ in }; xdg.configFile = lib.mkMerge [ - (lib.mapAttrs' (name: plugin: { + (lib.mapAttrs' (name: value: { name = "DankMaterialShell/plugins/${name}"; - value.source = plugin.src; - }) (lib.filterAttrs (n: v: v.enable) cfg.plugins)) + inherit value; + }) common.plugins) { "DankMaterialShell/default-settings.json" = lib.mkIf (cfg.default.settings != { }) { source = jsonFormat.generate "default-settings.json" cfg.default.settings; diff --git a/distro/nix/nixos.nix b/distro/nix/nixos.nix index 24a231b1..fd9185dc 100644 --- a/distro/nix/nixos.nix +++ b/distro/nix/nixos.nix @@ -39,6 +39,11 @@ in 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.accounts-daemon.enable = lib.mkDefault true; }; diff --git a/distro/nix/options.nix b/distro/nix/options.nix index 17454e04..6cfc8e8a 100644 --- a/distro/nix/options.nix +++ b/distro/nix/options.nix @@ -77,7 +77,7 @@ in description = "Whether to enable this plugin"; }; src = lib.mkOption { - type = types.package; + type = types.either types.package types.path; description = "Source of the plugin package or path"; }; };