diff options
| author | triethyl <triethylammonium@pm.me> | 2025-08-20 20:03:01 -0400 |
|---|---|---|
| committer | triethyl <triethylammonium@pm.me> | 2025-08-20 20:03:01 -0400 |
| commit | aa63ba907a1094f9e9c4ff7ed877bda275383c34 (patch) | |
| tree | e8d04118de77bd32296c646ced8a09b0b837db58 /pkgs | |
| parent | 35bf3a338950be2eedcef539f2c1e147278f1766 (diff) | |
created dfmodsync package
Diffstat (limited to 'pkgs')
| -rw-r--r-- | pkgs/default.nix | 1 | ||||
| -rw-r--r-- | pkgs/dfmodsync.nix | 19 |
2 files changed, 20 insertions, 0 deletions
diff --git a/pkgs/default.nix b/pkgs/default.nix index 32a1f6a..892b6a5 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -7,4 +7,5 @@ setup-manager = pkgs.callPackage ./setup-manager {}; custom-neovim = pkgs.callPackage ./custom-neovim {inherit inputs;}; old-custom-neovim = pkgs.callPackage ./old-custom-neovim {inherit inputs;}; + dfmodsync = pkgs.callPackage ./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!" + +'' |
