From 6e4711727e7e7b56a7b479a5f5839a87e5b334cf Mon Sep 17 00:00:00 2001 From: aszlig Date: Mon, 2 Jul 2018 17:57:31 +0200 Subject: [PATCH] nixos/hadoop: Replace users.extra{Users,Groups} In fff5923686c21dd147bde62d08e9f1042deadb4f all occurences of users.extraUsers and users.extraGroups have been changed tree-wide to users.users and users.group. In the meantime the hadoop modules were introduced via #41381 (060a98e9f4ad879492e48d63e887b0b6db26299e). Unfortunately those modules still use users.extraUsers, which has been renamed a long time ago (14321ae2431e33f5ed81f1ee43eddd29c7e9d01d, about three years from now), so let's actually rename it accordingly as well. Signed-off-by: aszlig Cc: @matthewbauer, @aespinosa --- nixos/modules/services/cluster/hadoop/default.nix | 6 +++--- nixos/modules/services/cluster/hadoop/hdfs.nix | 2 +- nixos/modules/services/cluster/hadoop/yarn.nix | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/nixos/modules/services/cluster/hadoop/default.nix b/nixos/modules/services/cluster/hadoop/default.nix index 53c13fd0603d..240938f0d621 100644 --- a/nixos/modules/services/cluster/hadoop/default.nix +++ b/nixos/modules/services/cluster/hadoop/default.nix @@ -52,9 +52,9 @@ with lib; config = mkMerge [ - (mkIf (builtins.hasAttr "yarn" config.users.extraUsers || - builtins.hasAttr "hdfs" config.users.extraUsers ) { - users.extraGroups.hadoop = { + (mkIf (builtins.hasAttr "yarn" config.users.users || + builtins.hasAttr "hdfs" config.users.users) { + users.groups.hadoop = { gid = config.ids.gids.hadoop; }; }) diff --git a/nixos/modules/services/cluster/hadoop/hdfs.nix b/nixos/modules/services/cluster/hadoop/hdfs.nix index 48020e6139cb..a38b6a78d3a5 100644 --- a/nixos/modules/services/cluster/hadoop/hdfs.nix +++ b/nixos/modules/services/cluster/hadoop/hdfs.nix @@ -62,7 +62,7 @@ with lib; (mkIf ( cfg.hdfs.namenode.enabled || cfg.hdfs.datanode.enabled ) { - users.extraUsers.hdfs = { + users.users.hdfs = { description = "Hadoop HDFS user"; group = "hadoop"; uid = config.ids.uids.hdfs; diff --git a/nixos/modules/services/cluster/hadoop/yarn.nix b/nixos/modules/services/cluster/hadoop/yarn.nix index ce5b04a331c5..5345a2732d7e 100644 --- a/nixos/modules/services/cluster/hadoop/yarn.nix +++ b/nixos/modules/services/cluster/hadoop/yarn.nix @@ -27,7 +27,7 @@ with lib; cfg.yarn.resourcemanager.enabled || cfg.yarn.nodemanager.enabled ) { - users.extraUsers.yarn = { + users.users.yarn = { description = "Hadoop YARN user"; group = "hadoop"; uid = config.ids.uids.yarn;