From d85066088f0c00d0e229ec7dc538878d07f0e39f Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Giraudeau Date: Tue, 2 Mar 2021 16:37:20 +0100 Subject: [PATCH 1/2] nixos: set FreeBind on socket. since they now manage TCP sockets binded to adress that might not be fully configured yet (eg. reboot). --- nix/nixos/cardano-node-service.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nix/nixos/cardano-node-service.nix b/nix/nixos/cardano-node-service.nix index b4a5be5d1c7..489ed653791 100644 --- a/nix/nixos/cardano-node-service.nix +++ b/nix/nixos/cardano-node-service.nix @@ -518,6 +518,7 @@ in { SocketMode = "0660"; SocketUser = "cardano-node"; SocketGroup = "cardano-node"; + FreeBind = "yes"; }; } (cfg.extraSocketConfig i))); } From a87a8aa108f5fc04905dfa57447cf4a9cca0ec9f Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Giraudeau Date: Tue, 2 Mar 2021 16:55:18 +0100 Subject: [PATCH 2/2] Add bash/zsh completion to cardano-node and cardano-cli packages. --- nix/haskell.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/nix/haskell.nix b/nix/haskell.nix index 39b32cd0a60..150567f13bc 100644 --- a/nix/haskell.nix +++ b/nix/haskell.nix @@ -79,11 +79,17 @@ let }); } { - # Stamp executables with the git revision + # Stamp executables with the git revision and add shell completion packages = lib.genAttrs ["cardano-node" "cardano-cli"] (name: { components.exes.${name}.postInstall = '' ${lib.optionalString stdenv.hostPlatform.isWindows setLibSodium} ${setGitRev} + '' + lib.optionalString (!stdenv.hostPlatform.isWindows) '' + BASH_COMPLETIONS=$out/share/bash-completion/completions + ZSH_COMPLETIONS=$out/share/zsh/site-functions + mkdir -p $BASH_COMPLETIONS $ZSH_COMPLETIONS + $out/bin/${name} --bash-completion-script ${name} > $BASH_COMPLETIONS/${name} + $out/bin/${name} --zsh-completion-script ${name} > $ZSH_COMPLETIONS/_${name} ''; }); }