Skip to content

Conversation

@avnik
Copy link
Contributor

@avnik avnik commented Jan 30, 2024

No description provided.

@avnik avnik marked this pull request as draft January 30, 2024 15:03
@avnik avnik force-pushed the avnik/node-module branch 3 times, most recently from ff7c471 to 8e083ab Compare February 1, 2024 14:20
Copy link
Member

@aciceri aciceri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know you said to to review concepts because you had to refactor it but I couldn't resist, sorry...

Wasn't there already another PR about pre-commit-hooks? If you can please remove relative commits from there, probably you inadvertently created this branch starting from the other one.

Comment on lines 10 to 81
shellyEraKeysType = submodule {
# Shelly+ era secrets path definitions
vrfKey = mkOption {
# "${name}-vrf.skey";
type = either path str;
};
kesKey = mkOption {
type = either path str;
# "${name}-kes.skey";
};
coldVerification = mkOption {
type = either path str;
# "${name}-cold.vkey";
};
operationalCertificate = mkOption {
type = either path str;
# "${name}.opcert";
};
bulkCredentials = mkOption {
type = nullOr (either path str);
# "${name}-bulk.creds";
};
};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps you could create a type alias at this point.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you want I believe you can define types as options of type type, which is better than having a file like this because it allows people overriding them. (can't think a reason why it would be useful but still better provide the maximum customizability)

script = ''
# Show commandline before execution
set -x
exec ${getBin instance.package}/bin/cardano-node run ${toGNUCommandLineShell instance.options}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
exec ${getBin instance.package}/bin/cardano-node run ${toGNUCommandLineShell instance.options}
exec ${getExe instance.package} run ${toGNUCommandLineShell instance.options}

systemd.services =
{
# default systemd service to control them all (FIXME: now a stub)
# FIXME: just rename "cardano-node-${instance.name}" to cardano-node in case of single node?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just rename "cardano-node-${instance.name}" to cardano-node in case of single node?

if it's easier for you I also like having always a default service that orchestrate other ones (optionally only one)

};
};

config = mkIf (length (attrNames cfg.instances) > 0) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
config = mkIf (length (attrNames cfg.instances) > 0) {
config = mkIf (attrNames cfg.instances != []) {

@aciceri
Copy link
Member

aciceri commented Feb 6, 2024

Also somehow docs are broken now (nix doesn't evaluate).

So at the end we are not re-using at all the upstream module, right? I accept the choice, just wanted to be sure. Anyway it would be nice at least providing the same options (I mean, the same customization possibilities) that they allow.

@aciceri aciceri mentioned this pull request Feb 15, 2024
@avnik avnik force-pushed the avnik/node-module branch from 8cba274 to b8f07d7 Compare February 18, 2024 18:04
@avnik avnik force-pushed the avnik/node-module branch from b8f07d7 to fe868f7 Compare February 27, 2024 15:42
@brainrake
Copy link
Contributor

Thank you!
This PR was superseded by #45

@brainrake brainrake closed this Mar 24, 2024
@brainrake brainrake deleted the avnik/node-module branch May 16, 2024 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants