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} ''; }); } 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))); }