Skip to content

Commit

Permalink
Removal of genesis-file and genesis-hash arguments from Nix derivations
Browse files Browse the repository at this point in the history
  • Loading branch information
Jimbo4350 committed Mar 17, 2020
1 parent cb10690 commit 05e1a08
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
8 changes: 8 additions & 0 deletions nix/nixos/cardano-node-service.nix
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,14 @@ in {
'';
};

genesisFile = mkOption {
type = types.path;
default = envConfig.genesisFile;
description = ''
Genesis json file
'';
};

genesisHash = mkOption {
type = types.nullOr types.str;
default = envConfig.genesisHash;
Expand Down
7 changes: 7 additions & 0 deletions nix/nixos/chairman-as-a-service.nix
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,13 @@ in {
default = 2160;
description = ''Should come from genesis instead.'';
};
genesisHash = mkOption {
type = types.str;
default = envConfig.genesisHash;
description = ''
Hash of the genesis file
'';
};
slot-length = mkOption {
type = int;
default = 20;
Expand Down
3 changes: 1 addition & 2 deletions nix/svclib.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ let
(optionalAttrs (cfg.protover-major or null != null) { LastKnownBlockVersion-Major = cfg.protover-major; }) //
(optionalAttrs (cfg.protover-minor or null != null) { LastKnownBlockVersion-Minor = cfg.protover-minor; }) //
(optionalAttrs (cfg.protover-alt or null != null) { LastKnownBlockVersion-Alt = cfg.protover-alt; }) //
(optionalAttrs (cfg.genesisFile != null) { GenesisFile = cfg.genesisFile; }) //
(optionalAttrs (cfg.genesisHash != null) { GenesisHash = cfg.genesisHash; });
(optionalAttrs (cfg.genesisFile != null) { GenesisFile = cfg.genesisFile; });

## mkFullyConnectedLocalClusterTopology
## :: String Address -> String Port -> Int PortNo -> Int Valency
Expand Down

0 comments on commit 05e1a08

Please sign in to comment.