add generate-secrets pkg
generate-secrets.sh will also be used in generate-secrets.nix, so DRY its dependency definitions.
This commit is contained in:
parent
e34093a8ac
commit
6447694214
@ -9,4 +9,5 @@
|
||||
hwi = pkgs.callPackage ./hwi { };
|
||||
pylightning = pkgs.python3Packages.callPackage ./pylightning { };
|
||||
liquid-swap = pkgs.python3Packages.callPackage ./liquid-swap { };
|
||||
generate-secrets = pkgs.callPackage ./generate-secrets { };
|
||||
}
|
||||
|
6
pkgs/generate-secrets/default.nix
Normal file
6
pkgs/generate-secrets/default.nix
Normal file
@ -0,0 +1,6 @@
|
||||
{ pkgs }: with pkgs;
|
||||
|
||||
writeScript "generate-secrets" ''
|
||||
export PATH=${lib.makeBinPath [ coreutils apg openssl ]}
|
||||
. ${./generate-secrets.sh} ${./openssl.cnf}
|
||||
''
|
@ -7,8 +7,9 @@ stdenv.mkDerivation rec {
|
||||
name = "nix-bitcoin-environment";
|
||||
|
||||
nixops19_09 = callPackage ./pkgs/nixops {};
|
||||
generate-secrets = callPackage ./pkgs/generate-secrets {};
|
||||
|
||||
buildInputs = with pkgs; [ nixops19_09 figlet apg openssl ];
|
||||
buildInputs = [ nixops19_09 figlet ];
|
||||
|
||||
shellHook = ''
|
||||
export NIX_PATH="nixpkgs=${nixpkgs}:."
|
||||
@ -18,6 +19,6 @@ stdenv.mkDerivation rec {
|
||||
# keys already added to my ssh-agent.
|
||||
export SSH_AUTH_SOCK=""
|
||||
figlet "nix-bitcoin"
|
||||
(cd secrets; ./generate_secrets.sh)
|
||||
(mkdir -p secrets; cd secrets; ${generate-secrets})
|
||||
'';
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user