nixos/hadoop: replace enable = mkoption bools with mkEnableOption

This commit is contained in:
illustris 2021-11-03 19:36:28 +05:30
parent c3d147f507
commit 42e14ff69f
2 changed files with 7 additions and 49 deletions

View File

@ -17,13 +17,7 @@ in
{
options.services.hadoop.hdfs = {
namenode = {
enable = mkOption {
type = types.bool;
default = false;
description = ''
Whether to run the HDFS NameNode
'';
};
enable = mkEnableOption "Whether to run the HDFS NameNode";
formatOnInit = mkOption {
type = types.bool;
default = false;
@ -43,13 +37,7 @@ in
};
};
datanode = {
enable = mkOption {
type = types.bool;
default = false;
description = ''
Whether to run the HDFS DataNode
'';
};
enable = mkEnableOption "Whether to run the HDFS DataNode";
inherit restartIfChanged;
openFirewall = mkOption {
type = types.bool;
@ -60,13 +48,7 @@ in
};
};
journalnode = {
enable = mkOption {
type = types.bool;
default = false;
description = ''
Whether to run the HDFS JournalNode
'';
};
enable = mkEnableOption "Whether to run the HDFS JournalNode";
inherit restartIfChanged;
openFirewall = mkOption {
type = types.bool;
@ -77,23 +59,11 @@ in
};
};
zkfc = {
enable = mkOption {
type = types.bool;
default = false;
description = ''
Whether to run the HDFS ZooKeeper failover controller
'';
};
enable = mkEnableOption "Whether to run the HDFS ZooKeeper failover controller";
inherit restartIfChanged;
};
httpfs = {
enable = mkOption {
type = types.bool;
default = false;
description = ''
Whether to run the HDFS httpfs failover controller
'';
};
enable = mkEnableOption "Whether to run the HDFS HTTPfs server";
tempPath = mkOption {
type = types.path;
default = "/tmp/hadoop/httpfs";

View File

@ -17,13 +17,7 @@ in
{
options.services.hadoop.yarn = {
resourcemanager = {
enable = mkOption {
type = types.bool;
default = false;
description = ''
Whether to run the Hadoop YARN ResourceManager
'';
};
enable = mkEnableOption "Whether to run the Hadoop YARN ResourceManager";
inherit restartIfChanged;
openFirewall = mkOption {
type = types.bool;
@ -34,13 +28,7 @@ in
};
};
nodemanager = {
enable = mkOption {
type = types.bool;
default = false;
description = ''
Whether to run the Hadoop YARN NodeManager
'';
};
enable = mkEnableOption "Whether to run the Hadoop YARN NodeManager";
inherit restartIfChanged;
addBinBash = mkOption {
type = types.bool;