# I could write a nice Sparrow task for nix-store queries too,
# so far it's just a plain Raku:
my @closure = run(<nix-store --query --requisites>,
$production, :out).out.lines;
bash "rsync --archive --compress --ignore-existing --relative --verbose \\
{@closure.join(' ')} \\
root@$host:/";
Hi! I noticed that deploy logic is implemented via Nix expression language with a bit of Raku scenario . Is it intentionally?
I understand that pure declarative style is perfect for package build scenarios, but could be difficult for deployment/CM tasks.
Consider using Sparrowdo/Sparrow alternative. It seems we already have all the bits in place.
For example:
provision of crai instance
sparrowdo ---ssh_host=$cra_instance_ip --sparrowfile=deploy.raku
deploy.raku
:copy nix files over rsync
sparrowdo --localhost --nosudo --sparrowfile=copy-files.raku
copy-files.raku
:It's just a thought, appreciate your feedback.