diff options
author | illustris <rharikrishnan95@gmail.com> | 2022-02-27 11:52:18 +0530 |
---|---|---|
committer | illustris <rharikrishnan95@gmail.com> | 2022-03-11 14:18:44 +0530 |
commit | 716b0dfaaf12afe83ff54b793dc52c022ab62155 (patch) | |
tree | 5725346fa6fc006a07d5dd79b62cfa34c7d00701 /nixos/modules/services/cluster/hadoop/hdfs.nix | |
parent | d39056d165c9dc480284f3bd1e63b6213f0e518d (diff) | |
download | nixpkgs-716b0dfaaf12afe83ff54b793dc52c022ab62155.tar nixpkgs-716b0dfaaf12afe83ff54b793dc52c022ab62155.tar.gz nixpkgs-716b0dfaaf12afe83ff54b793dc52c022ab62155.tar.bz2 nixpkgs-716b0dfaaf12afe83ff54b793dc52c022ab62155.tar.lz nixpkgs-716b0dfaaf12afe83ff54b793dc52c022ab62155.tar.xz nixpkgs-716b0dfaaf12afe83ff54b793dc52c022ab62155.tar.zst nixpkgs-716b0dfaaf12afe83ff54b793dc52c022ab62155.zip |
nixos/hadoop: add gateway role
Diffstat (limited to 'nixos/modules/services/cluster/hadoop/hdfs.nix')
-rw-r--r-- | nixos/modules/services/cluster/hadoop/hdfs.nix | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/nixos/modules/services/cluster/hadoop/hdfs.nix b/nixos/modules/services/cluster/hadoop/hdfs.nix index 61d9941298a..1725dc62d0c 100644 --- a/nixos/modules/services/cluster/hadoop/hdfs.nix +++ b/nixos/modules/services/cluster/hadoop/hdfs.nix @@ -51,6 +51,8 @@ let }; }; + services.hadoop.gatewayRole.enable = true; + networking.firewall.allowedTCPPorts = mkIf ((builtins.hasAttr "openFirewall" serviceOptions) && serviceOptions.openFirewall) allowedTCPPorts; @@ -145,17 +147,13 @@ in ]; }) - (mkIf - ( - cfg.hdfs.namenode.enable || cfg.hdfs.datanode.enable || cfg.hdfs.journalnode.enable || cfg.hdfs.zkfc.enable - ) - { - users.users.hdfs = { - description = "Hadoop HDFS user"; - group = "hadoop"; - uid = config.ids.uids.hdfs; - }; - }) + (mkIf cfg.gatewayRole.enable { + users.users.hdfs = { + description = "Hadoop HDFS user"; + group = "hadoop"; + uid = config.ids.uids.hdfs; + }; + }) (mkIf cfg.hdfs.httpfs.enable { users.users.httpfs = { description = "Hadoop HTTPFS user"; @@ -163,5 +161,6 @@ in isSystemUser = true; }; }) + ]; } |