From c7e1577e08439081fbb3a6bfa2b49a0b29e94cdd Mon Sep 17 00:00:00 2001 From: Alexander Foremny Date: Mon, 19 Feb 2024 05:50:03 +0100 Subject: add fysiweb-cli to shell --- shell.nix | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'shell.nix') diff --git a/shell.nix b/shell.nix index 1b660a3..5608b0b 100644 --- a/shell.nix +++ b/shell.nix @@ -1,12 +1,27 @@ -{ pkgs ? import { } }: +{ sources ? import ./nix/sources.nix +, pkgs ? import sources.nixpkgs { + overlays = [ + (self: super: { + fysiweb-cli = import sources.fysiweb-cli { }; + }) + (self: super: { + fysiweb.cli = pkgs.writers.writeDashBin "fysiweb" '' + set -efu + HETZNER_DNS_API_TOKEN=$(${self.pass}/bin/pass show hetznerdns-api-token); export HETZNER_DNS_API_TOKEN + exec ${super.fysiweb.cli}/bin/fysiweb "$@" + ''; + }) + ]; + } +}: let inherit (pkgs) lib; in pkgs.mkShell { buildInputs = [ + pkgs.fysiweb-cli pkgs.git pkgs.niv ]; shellHook = '' PASSWORD_STORE_DIR=${lib.escapeShellArg (toString ./.)}/secrets; export PASSWORD_STORE_DIR - HETZNER_DNS_API_TOKEN=$(pass show hetznerdns-api-token); export HETZNER_DNS_API_TOKEN ''; } -- cgit v1.2.3