add download script

This commit is contained in:
Cyryl Płotnicki 2021-07-30 23:31:50 +01:00
parent fa0bfc0858
commit 4b19e05193
2 changed files with 17 additions and 0 deletions

View file

@ -3,5 +3,6 @@
imports = [
./scripts/mount-vault.nix
./scripts/umount-vault.nix
./scripts/download.nix
];
}

View file

@ -0,0 +1,16 @@
{ config, pkgs, ... }:
let
download = pkgs.writeTextFile {
name = "download";
executable = true;
destination = "/bin/download";
text = ''
${pkgs.aria}/bin/aria2c -x 16 -s 16 $@
'';
};
in
{
home.packages = with pkgs; [ download ];
}