aboutsummaryrefslogtreecommitdiffstats
path: root/shell.nix
blob: b6016b915bb6c2fba84ceca58c0581f1ee47e164 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{ 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.authelia
    pkgs.fysiweb-cli
    pkgs.git
    pkgs.niv
    pkgs.pass
  ];
  shellHook = ''
    PASSWORD_STORE_DIR=${lib.escapeShellArg (toString ./.)}/secrets; export PASSWORD_STORE_DIR
  '';
}