Skip to content

Commit

Permalink
Merge #2436
Browse files Browse the repository at this point in the history
2436: nixos: add FreeBind to systemd sockets + bash completion r=jbgi a=jbgi



Co-authored-by: Jean-Baptiste Giraudeau <jean-baptiste.giraudeau@iohk.io>
  • Loading branch information
iohk-bors[bot] and jbgi committed Mar 3, 2021
2 parents 643b57b + a87a8aa commit c7bf68c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
8 changes: 7 additions & 1 deletion nix/haskell.nix
Expand Up @@ -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}
'';
});
}
Expand Down
1 change: 1 addition & 0 deletions nix/nixos/cardano-node-service.nix
Expand Up @@ -518,6 +518,7 @@ in {
SocketMode = "0660";
SocketUser = "cardano-node";
SocketGroup = "cardano-node";
FreeBind = "yes";
};
} (cfg.extraSocketConfig i)));
}
Expand Down

0 comments on commit c7bf68c

Please sign in to comment.