aboutsummaryrefslogtreecommitdiffstats
path: root/shell.nix
diff options
context:
space:
mode:
authorLibravatar Alexander Foremny <aforemny@posteo.de>2024-02-19 05:50:03 +0100
committerLibravatar Alexander Foremny <aforemny@posteo.de>2024-02-19 05:50:03 +0100
commitc7e1577e08439081fbb3a6bfa2b49a0b29e94cdd (patch)
tree11551ff836ad655c3bf287ad08be0aa20eafaadd /shell.nix
parentf30b5dc4563076436b4c76bcac04a635aaea795b (diff)
add fysiweb-cli to shell
Diffstat (limited to 'shell.nix')
-rw-r--r--shell.nix19
1 files changed, 17 insertions, 2 deletions
diff --git a/shell.nix b/shell.nix
index 1b660a3..5608b0b 100644
--- a/shell.nix
+++ b/shell.nix
@@ -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
'';
}