From aa63ba907a1094f9e9c4ff7ed877bda275383c34 Mon Sep 17 00:00:00 2001 From: triethyl Date: Wed, 20 Aug 2025 20:03:01 -0400 Subject: created dfmodsync package --- pkgs/dfmodsync.nix | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 pkgs/dfmodsync.nix (limited to 'pkgs/dfmodsync.nix') diff --git a/pkgs/dfmodsync.nix b/pkgs/dfmodsync.nix new file mode 100644 index 0000000..fd6e18c --- /dev/null +++ b/pkgs/dfmodsync.nix @@ -0,0 +1,19 @@ +{pkgs}: +pkgs.writers.writeNuBin "dfmodsync" +/* +nu +*/ +'' + + let workshop_dir = "~/.local/share/Steam/steamapps/workshop/content/975370" + let df_dir = "~/.local/share/Steam/steamapps/common/Dwarf Fortress/mods" + + let workshop_dir = $workshop_dir | path expand + let df_dir = $df_dir | path expand + + glob $"($df_dir)/*" | each {rm -rf $in ; print $"deleted ($in | path basename)"} + glob $"($workshop_dir)/*" | each {cp -r $in $df_dir; print $"copied ($in | path basename)"} + + print "Synced Mods!" + +'' -- cgit v1.2.3