From b28e024fdf1119a749d1a94c21773855650efe06 Mon Sep 17 00:00:00 2001 From: Michael Walker Date: Fri, 26 Jan 2024 23:51:27 +0000 Subject: [PATCH] Rename `restic-backups` script to `backups` --- flake.nix | 12 ++++++------ scripts/{restic-backups.sh => backups.sh} | 0 shared/restic-backups/default.nix | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) rename scripts/{restic-backups.sh => backups.sh} (100%) diff --git a/flake.nix b/flake.nix index a7d71413..21255717 100644 --- a/flake.nix +++ b/flake.nix @@ -69,6 +69,12 @@ }; in { + backups = mkApp "backups" '' + PATH=${with pkgs; lib.makeBinPath [ restic sops nettools ]} + + ${pkgs.lib.fileContents ./scripts/backups.sh} + ''; + fmt = mkApp "fmt" '' PATH=${with pkgs; lib.makeBinPath [ nix git python3Packages.black ]} @@ -82,12 +88,6 @@ ${pkgs.lib.fileContents ./scripts/lint.sh} ''; - restic-backups = mkApp "backups" '' - PATH=${with pkgs; lib.makeBinPath [ restic sops nettools ]} - - ${pkgs.lib.fileContents ./scripts/restic-backups.sh} - ''; - secrets = mkApp "secrets" '' PATH=${with pkgs; lib.makeBinPath [ sops nettools vim ]} export EDITOR=vim diff --git a/scripts/restic-backups.sh b/scripts/backups.sh similarity index 100% rename from scripts/restic-backups.sh rename to scripts/backups.sh diff --git a/shared/restic-backups/default.nix b/shared/restic-backups/default.nix index b1d79417..27af485d 100644 --- a/shared/restic-backups/default.nix +++ b/shared/restic-backups/default.nix @@ -5,15 +5,15 @@ # List all the snapshots with: # # ```bash -# nix run .#restic-backups # all snapshots -# nix run .#restic-backups -- snapshots --host # for a specific host -# nix run .#restic-backups -- snapshots --tag # for a specific tag +# nix run .#backups # all snapshots +# nix run .#backups -- snapshots --host # for a specific host +# nix run .#backups -- snapshots --tag # for a specific tag # ``` # # Restore a snapshot to `` with: # # ```bash -# nix run .#restic-backups restore [] +# nix run .#backups restore [] # ``` # # If unspecified, the snapshot is restored to `/tmp/restic-restore-`.