From 05e1a087f3d6045002e348ccfcb298c643f3caba Mon Sep 17 00:00:00 2001 From: Jordan Millar Date: Mon, 16 Mar 2020 15:31:16 +0000 Subject: [PATCH] Removal of genesis-file and genesis-hash arguments from Nix derivations --- nix/nixos/cardano-node-service.nix | 8 ++++++++ nix/nixos/chairman-as-a-service.nix | 7 +++++++ nix/svclib.nix | 3 +-- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/nix/nixos/cardano-node-service.nix b/nix/nixos/cardano-node-service.nix index 31a89fcab28..3dbafc14333 100644 --- a/nix/nixos/cardano-node-service.nix +++ b/nix/nixos/cardano-node-service.nix @@ -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; diff --git a/nix/nixos/chairman-as-a-service.nix b/nix/nixos/chairman-as-a-service.nix index 38b27998e29..2ac6cb2b9f9 100644 --- a/nix/nixos/chairman-as-a-service.nix +++ b/nix/nixos/chairman-as-a-service.nix @@ -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; diff --git a/nix/svclib.nix b/nix/svclib.nix index d435ef39921..e1d44bb2ac5 100644 --- a/nix/svclib.nix +++ b/nix/svclib.nix @@ -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