about summary refs log tree commit diff stats
path: root/pkgs/by-name/sw/swallow/package.nix
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--pkgs/by-name/sw/swallow/package.nix (renamed from modules/home.legacy/conf/beets/plugins/play/default.nix)24
1 files changed, 13 insertions, 11 deletions
diff --git a/modules/home.legacy/conf/beets/plugins/play/default.nix b/pkgs/by-name/sw/swallow/package.nix
index 9d26f16a..16608143 100644
--- a/modules/home.legacy/conf/beets/plugins/play/default.nix
+++ b/pkgs/by-name/sw/swallow/package.nix
@@ -8,16 +8,18 @@
 # You should have received a copy of the License along with this program.
 # If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>.
 {
-  lib,
-  pkgs,
-  config,
-  ...
-}: {
-  programs.beets.settings.play = {
-    command = "${lib.getExe pkgs.mpc} $args add";
-    relative_to = config.services.mpd.musicDirectory;
+  writeShellApplication,
+  # Dependencies
+  river-classic,
+}:
+writeShellApplication {
+  name = "swallow";
+  text = builtins.readFile ./swallow.sh;
 
-    # Run the command with the returned paths as arguments
-    raw = true;
-  };
+  # We need to inherit the path, so that we can spawn stuff in a swallowed mode.
+  inheritPath = true;
+
+  runtimeInputs = [
+    river-classic
+  ];
 }