krebs / krops

Mirror of https://cgit.krebsco.de/krops/about/ (PRs / issues accepted, as can be seen by not having them disabled)
Do What The F*ck You Want To Public License
132 stars 18 forks source link

Is there any way to include file suffixes on files copied to the server #1

Closed NotBrianZach closed 4 years ago

NotBrianZach commented 4 years ago

seems like it would be nice to have, might think about it myself if it's not possible currently

4z3 commented 4 years ago

Can you rephrase that, I'm not exactly sure what's meant by "including file suffixes on files copied". To me it reads like "is there a way to just copy files with a given suffix". If that's the question, then it could be accomplished using rsync filters (.rsync-filter files). The rsync contains information about that.

NotBrianZach commented 4 years ago

https://github.com/krebs/krops/blob/master/pkgs/populate/default.nix looking in this file, there doesn't seem to be a way to include file suffix in the target path unless something like this is possible

lib.evalSource [ "myFile.sql".file = toString /homedir/example.sql; ]; or I guess you could get the file suffix by sticking the file in a directory then using .file to include the directory

4z3 commented 4 years ago

"myFile.sql".file = toString /homedir/example.sql;

This is possible.