diff options
author | Alexander Foremny <aforemny@posteo.de> | 2024-02-19 05:50:03 +0100 |
---|---|---|
committer | Alexander Foremny <aforemny@posteo.de> | 2024-02-19 05:50:03 +0100 |
commit | c7e1577e08439081fbb3a6bfa2b49a0b29e94cdd (patch) | |
tree | 11551ff836ad655c3bf287ad08be0aa20eafaadd /shell.nix | |
parent | f30b5dc4563076436b4c76bcac04a635aaea795b (diff) |
add fysiweb-cli to shell
Diffstat (limited to 'shell.nix')
-rw-r--r-- | shell.nix | 19 |
1 files changed, 17 insertions, 2 deletions
@@ -1,12 +1,27 @@ -{ pkgs ? import <nixpkgs> { } }: +{ 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 ''; } |