Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

66 changes: 33 additions & 33 deletions flake/nixosModules/profile-cardano-parts.nix
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ flake @ {moduleWithSystem, ...}: {
...
}: let
inherit (builtins) attrNames deepSeq elem head stringLength;
inherit (lib) count filterAttrs foldl' isList mapAttrsToList mdDoc mapAttrs' mkIf mkOption nameValuePair optional optionalString pipe recursiveUpdate types;
inherit (lib) count filterAttrs foldl' isList mapAttrsToList mapAttrs' mkIf mkOption nameValuePair optional optionalString pipe recursiveUpdate types;
inherit (types) anything attrsOf bool enum ints listOf oneOf package port nullOr str submodule;
inherit (cfg.group) groupFlake;
inherit (cfgPerNode.lib) topologyLib;
Expand All @@ -71,15 +71,15 @@ flake @ {moduleWithSystem, ...}: {
mkPkgOpt = name: pkg: {
${name} = mkOption {
type = package;
description = mdDoc "The cardano-parts nixos default package for ${name}.";
description = "The cardano-parts nixos default package for ${name}.";
default = pkg;
};
};

mkSpecialOpt = name: type: specialPkg: {
${name} = mkOption {
inherit type;
description = mdDoc "The cardano-parts nixos default special package for ${name}.";
description = "The cardano-parts nixos default special package for ${name}.";
default = specialPkg;
};
};
Expand All @@ -88,13 +88,13 @@ flake @ {moduleWithSystem, ...}: {
options = {
cluster = mkOption {
type = clusterSubmodule;
description = mdDoc "Cardano-parts nixos cluster submodule";
description = "Cardano-parts nixos cluster submodule";
default = {};
};

perNode = mkOption {
type = perNodeSubmodule;
description = mdDoc "Cardano-parts nixos perNode submodule";
description = "Cardano-parts nixos perNode submodule";
default = {};
};
};
Expand All @@ -105,7 +105,7 @@ flake @ {moduleWithSystem, ...}: {
group = mkOption {
type = attrsOf anything;
inherit (flake.config.flake.cardano-parts.cluster.groups) default;
description = mdDoc "The cardano group to associate with the nixos node.";
description = "The cardano group to associate with the nixos node.";
};
};
};
Expand All @@ -114,31 +114,31 @@ flake @ {moduleWithSystem, ...}: {
options = {
generic = mkOption {
type = genericSubmodule;
description = mdDoc "Cardano-parts nixos perNode generic submodule";
description = "Cardano-parts nixos perNode generic submodule";
default = {};
};

lib = mkOption {
type = libSubmodule;
description = mdDoc "Cardano-parts nixos perNode lib submodule";
description = "Cardano-parts nixos perNode lib submodule";
default = {};
};

meta = mkOption {
type = metaSubmodule;
description = mdDoc "Cardano-parts nixos perNode meta submodule";
description = "Cardano-parts nixos perNode meta submodule";
default = {};
};

pkgs = mkOption {
type = pkgsSubmodule;
description = mdDoc "Cardano-parts nixos perNode pkgs submodule";
description = "Cardano-parts nixos perNode pkgs submodule";
default = {};
};

roles = mkOption {
type = rolesSubmodule;
description = mdDoc "Cardano-parts nixos perNode roles submodule";
description = "Cardano-parts nixos perNode roles submodule";
default = {};
};
};
Expand All @@ -148,15 +148,15 @@ flake @ {moduleWithSystem, ...}: {
options = {
abortOnMissingIpModule = mkOption {
type = bool;
description = mdDoc ''
description = ''
The option to abort on missing downstream provided "ip-module" nixosModule.
'';
default = cfg.group.generic.abortOnMissingIpModule;
};

warnOnMissingIpModule = mkOption {
type = bool;
description = mdDoc ''
description = ''
The option to warn on missing downstream provided "ip-module" nixosModule.
'';
default = cfg.group.generic.warnOnMissingIpModule;
Expand All @@ -176,91 +176,91 @@ flake @ {moduleWithSystem, ...}: {
options = {
addressType = mkOption {
type = enum ["fqdn" "namePrivateIpv4" "namePublicIpv4" "namePublicIpv6" "privateIpv4" "publicIpv4" "publicIpv6"];
description = mdDoc "The default addressType for topologyLib mkProducer function.";
description = "The default addressType for topologyLib mkProducer function.";
default = cfg.group.meta.addressType;
};

blockfrost-platform-service = mkOption {
type = str;
description = mdDoc "The blockfrost-platform-service import path string.";
description = "The blockfrost-platform-service import path string.";
default = cfg.group.meta.blockfrost-platform-service;
};

cardanoDbSyncPrometheusExporterPort = mkOption {
type = port;
description = mdDoc "The port to associate with the nixos cardano-db-sync prometheus exporter.";
description = "The port to associate with the nixos cardano-db-sync prometheus exporter.";
default = cfg.group.meta.cardanoDbSyncPrometheusExporterPort;
};

cardanoNodePort = mkOption {
type = port;
description = mdDoc "The port to associate with the nixos cardano-node.";
description = "The port to associate with the nixos cardano-node.";
default = cfg.group.meta.cardanoNodePort;
};

cardanoNodePrometheusExporterPort = mkOption {
type = port;
description = mdDoc "The port to associate with the nixos cardano-node prometheus exporter.";
description = "The port to associate with the nixos cardano-node prometheus exporter.";
default = cfg.group.meta.cardanoNodePrometheusExporterPort;
};

cardanoSmashDelistedPools = mkOption {
type = listOf str;
description = mdDoc "The cardano-smash delisted pools.";
description = "The cardano-smash delisted pools.";
default = cfg.group.meta.cardanoSmashDelistedPools;
};

cardano-db-sync-service = mkOption {
type = str;
description = mdDoc "The cardano-db-sync-service import path string.";
description = "The cardano-db-sync-service import path string.";
default = cfg.group.meta.cardano-db-sync-service;
};

cardano-faucet-service = mkOption {
type = str;
description = mdDoc "The cardano-faucet-service import path string.";
description = "The cardano-faucet-service import path string.";
default = cfg.group.meta.cardano-faucet-service;
};

cardano-metadata-service = mkOption {
type = str;
description = mdDoc "The cardano-metadata-service import path string.";
description = "The cardano-metadata-service import path string.";
default = cfg.group.meta.cardano-metadata-service;
};

cardano-node-service = mkOption {
type = str;
description = mdDoc "The cardano-node-service import path string.";
description = "The cardano-node-service import path string.";
default = cfg.group.meta.cardano-node-service;
};

cardano-ogmios-service = mkOption {
type = str;
description = mdDoc "The cardano-ogmios-service import path string.";
description = "The cardano-ogmios-service import path string.";
default = cfg.group.meta.cardano-ogmios-service;
};

cardano-smash-service = mkOption {
type = str;
description = mdDoc "The cardano-smash-service import path string.";
description = "The cardano-smash-service import path string.";
default = cfg.group.meta.cardano-smash-service;
};

cardano-submit-api-service = mkOption {
type = str;
description = mdDoc "The cardano-submit-api-service import path string.";
description = "The cardano-submit-api-service import path string.";
default = cfg.group.meta.cardano-submit-api-service;
};

cardano-tracer-service = mkOption {
type = str;
description = mdDoc "The cardano-tracer-service import path string.";
description = "The cardano-tracer-service import path string.";
default = cfg.group.meta.cardano-tracer-service;
};

enableAlertCount = mkOption {
type = bool;
description = mdDoc ''
description = ''
Whether to count this machine as an expected machine to appear in grafana/prometheus metrics.

In cases where this machine may be created, but mostly kept in a stopped state such that it will
Expand All @@ -275,7 +275,7 @@ flake @ {moduleWithSystem, ...}: {

enableDns = mkOption {
type = bool;
description = mdDoc ''
description = ''
Whether to create a DNS for this machine when running `just tofu apply`.

Typically, only block producers or other sensitive machines would want to set this to false.
Expand All @@ -285,19 +285,19 @@ flake @ {moduleWithSystem, ...}: {

hostAddr = mkOption {
type = str;
description = mdDoc "The hostAddr to associate with the nixos cardano-node for ipv4 binding.";
description = "The hostAddr to associate with the nixos cardano-node for ipv4 binding.";
default = "0.0.0.0";
};

hostAddrIpv6 = mkOption {
type = str;
description = mdDoc "The hostAddr to associate with the nixos cardano-node for ipv6 binding.";
description = "The hostAddr to associate with the nixos cardano-node for ipv6 binding.";
default = "::0";
};

hostsList = mkOption {
type = oneOf [(enum ["all" "group"]) (listOf str)];
description = mdDoc ''
description = ''
A list of Colmena machine names for which /etc/hosts will be configured for if
nixosModule.ip-module is available in the downstream repo and profile-cardano-parts
nixosModule is imported.
Expand All @@ -313,7 +313,7 @@ flake @ {moduleWithSystem, ...}: {

nodeId = mkOption {
type = nullOr ints.unsigned;
description = mdDoc "The hostAddr to associate with the nixos cardano-node.";
description = "The hostAddr to associate with the nixos cardano-node.";
default = 0;
};
};
Expand Down
15 changes: 10 additions & 5 deletions flakeModules/aws.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
lib,
...
}: let
inherit (lib) foldl' mdDoc mkDefault mkOption recursiveUpdate types;
inherit (lib) foldl' mkDefault mkOption recursiveUpdate types;
inherit (types) anything attrsOf submodule;

cfg = config.flake.cardano-parts;
Expand All @@ -23,7 +23,7 @@
options = {
aws = mkOption {
type = awsSubmodule;
description = mdDoc "Cardano-parts aws options";
description = "Cardano-parts aws options";
default = {};
};
};
Expand All @@ -33,7 +33,7 @@
options = {
ec2 = mkOption {
type = ec2Submodule;
description = mdDoc "Cardano-parts aws ec2 options";
description = "Cardano-parts aws ec2 options";
default = {};
};
};
Expand All @@ -43,13 +43,18 @@
options = {
rawSpec = mkOption {
type = anything;
description = mdDoc "The cardano-parts aws ec2 instance type raw spec reference.";
description = "The cardano-parts aws ec2 instance type raw spec reference.";
default = builtins.fromJSON (builtins.readFile ./aws/ec2-spec.json);
defaultText = lib.literalExpression "builtins.fromJSON (builtins.readFile ./aws/ec2-spec.json)";
};

spec = mkOption {
type = attrsOf anything;
description = mdDoc "The cardano-parts aws ec2 instance type spec reference.";
description = "The cardano-parts aws ec2 instance type spec reference.";
defaultText = lib.literalExpression ''
# Attrset of EC2 instance specs keyed by InstanceType, derived from rawSpec.
# Each entry has: provider, nodeType, coreCount, cpuCount, memMiB, threadsPerCore.
'';
default = foldl' (acc: spec:
recursiveUpdate acc {
${spec.InstanceType} = {
Expand Down
Loading