From 09c772514cee092b9bfa6cad50e605ea3cb51776 Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Thu, 17 Dec 2020 11:27:53 +0100 Subject: [PATCH] Add deploy script --- deploy.nix | 1 - shell.nix | 5 +++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/deploy.nix b/deploy.nix index 313454e..7468348 100644 --- a/deploy.nix +++ b/deploy.nix @@ -1,4 +1,3 @@ -# Deploy with: nix build -f ./deploy.nix HOSTNAME && ./result let sources = import ./nix/sources.nix; diff --git a/shell.nix b/shell.nix index 93eb166..807aba4 100644 --- a/shell.nix +++ b/shell.nix @@ -20,6 +20,11 @@ let git diff --exit-code -s nix/sources.json && echo "Already up to date." && exit 0 git commit -m "Update sources" nix/sources.json ''; + + deploy = '' + set -e + $(nix-build --no-out-link deploy.nix -A "$1") + ''; }; in pkgs.mkShell {