diff --git a/nix/pkgs/default.nix b/nix/pkgs/default.nix index a91c709..a5fe44c 100644 --- a/nix/pkgs/default.nix +++ b/nix/pkgs/default.nix @@ -10,6 +10,7 @@ in notes = callPackage ./notes.nix { }; i3-battery-popup = callPackage ./i3-battery-popup.nix { }; tmux-sessionizer = callPackage ./tmux-sessionizer.nix { }; + upload-to-files = callPackage ./upload-to-files.nix { }; vimPlugins = prev.vimPlugins // vimPlugins; } diff --git a/nix/pkgs/upload-to-files.nix b/nix/pkgs/upload-to-files.nix new file mode 100644 index 0000000..da0641b --- /dev/null +++ b/nix/pkgs/upload-to-files.nix @@ -0,0 +1,9 @@ +{ pkgs }: + +pkgs.writeShellApplication { + name = "upload-to-files"; + + text = '' + ${pkgs.rsync}/bin/rsync -avz --info=progress2 "$1" ssh.oliverdavies.uk:/var/www/vhosts/files.oliverdavies.uk + ''; +} diff --git a/nix/users/opdavies/default.nix b/nix/users/opdavies/default.nix index 0d15bcd..117f9af 100644 --- a/nix/users/opdavies/default.nix +++ b/nix/users/opdavies/default.nix @@ -23,7 +23,9 @@ packages = with pkgs; - [ ] + [ + upload-to-files + ] ++ pkgs.lib.optionals (!headless) [ brave firefox