From 4b19e05193a0c55a7abcaeb142cee3a784df1cf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki?= Date: Fri, 30 Jul 2021 23:31:50 +0100 Subject: [PATCH] add download script --- nixos/home-manager/scripts.nix | 1 + nixos/home-manager/scripts/download.nix | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 nixos/home-manager/scripts/download.nix diff --git a/nixos/home-manager/scripts.nix b/nixos/home-manager/scripts.nix index 39f58dc3..2f707e67 100644 --- a/nixos/home-manager/scripts.nix +++ b/nixos/home-manager/scripts.nix @@ -3,5 +3,6 @@ imports = [ ./scripts/mount-vault.nix ./scripts/umount-vault.nix + ./scripts/download.nix ]; } diff --git a/nixos/home-manager/scripts/download.nix b/nixos/home-manager/scripts/download.nix new file mode 100644 index 00000000..2a74b625 --- /dev/null +++ b/nixos/home-manager/scripts/download.nix @@ -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 ]; + }