Open locallycompact opened 2 years ago
Hello @locallycompact, that error message probably means that the cardano-wallet service user doesn't have write permission on the cardano-node socket file.
I don't think that the cardano-node
package is overridden in cardano-wallet.nixosModule
- is it?
I don't really know what it's doing https://github.com/input-output-hk/cardano-wallet/blob/master/flake.nix#L76
In any case, I made a new set of systemd services that force everything to be owned by the same user. https://github.com/cardano-system/cardano-system
Yeah that line of flake.nix
looks like a bug to me.
It looks like DynamicUser
in our systemd service causes difficulties with permissions. We should just have a services.cardano-wallet.user
option as you have done.
@locallycompact Would such service support multiple cardano-wallet
s for different users on a single machine?
I can't make cardano-ogmios
work with cardano-node
because cardano-node
opens up a socket which has read-only permissions while cardano-ogmios
needs write permissions additionally. And since none of both services offer a way to change the group I have to manually change permissions for the socket
Thanks to Nix I was able to figure out the following workaround This is what I have to do:
services.cardano-node = {
enable = true;
nodeConfigFile = "${self.inputs.cardano-node}/configuration/cardano/${config.services.cardano-node.environment}-config.json";
topology = "${self.inputs.cardano-node}/configuration/cardano/${config.services.cardano-node.environment}-topology.json";
extraServiceConfig = i: {
serviceConfig.ExecStartPost = pkgs.writeShellScript "change-cardano-node-socket-permissions" ''
timeout=10
while [ ! -S ${config.services.cardano-node.socketPath} ]; do
if [ "$timeout" == 0 ]; then
echo "ERROR: Timeout while waiting for the cardano-node socket to appear ${config.services.cardano-node.socketPath}"
exit 1
fi
sleep 1
((timeout--))
done
chmod 0666 ${config.services.cardano-node.socketPath}
'';
};
};
The problem that you wish to solve
Hi, I'd like a version of the cardano-wallet systemd service that does not override the cardano node package. I can currently override it by doing something like this:
But then I get this error
Description
As above
Implementation suggestions
No response