From 206b6bdaf237b41ab14af9494f59753487fd5d56 Mon Sep 17 00:00:00 2001 From: zetavg Date: Sat, 4 Apr 2020 17:36:11 +0800 Subject: [PATCH] do not assign lists to users.users warning: In file [...] a list is being assigned to the option config.users.users. This will soon be an error as type loaOf is deprecated. See https://github.com/NixOS/nixpkgs/pull/63103 for more information. --- services/elastic-apm-server.nix | 3 +-- services/filebeat.nix | 3 +-- services/heartbeat7.nix | 3 +-- services/metricbeat.nix | 3 +-- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/services/elastic-apm-server.nix b/services/elastic-apm-server.nix index 14b84fd..f3322e1 100644 --- a/services/elastic-apm-server.nix +++ b/services/elastic-apm-server.nix @@ -74,8 +74,7 @@ in { config = lib.mkIf (cfg.enable) { environment.systemPackages = [ cfg.package ]; - users.users = singleton { - name = "elastic-apm-server"; + users.users."elastic-apm-server" = { uid = 216; description = "Elastic APM Server user"; home = cfg.dataDir; diff --git a/services/filebeat.nix b/services/filebeat.nix index 09e4295..265aef2 100644 --- a/services/filebeat.nix +++ b/services/filebeat.nix @@ -78,8 +78,7 @@ in { config = lib.mkIf (cfg.enable) { environment.systemPackages = [ cfg.package ]; - users.users = singleton { - name = serviceName; + users.users."${serviceName}" = { description = "Filebeat user"; # Need permission to read Nginx logs. # TODO: Make this configurable? diff --git a/services/heartbeat7.nix b/services/heartbeat7.nix index 7dfd733..ba87c63 100644 --- a/services/heartbeat7.nix +++ b/services/heartbeat7.nix @@ -63,8 +63,7 @@ in { config = lib.mkIf (cfg.enable) { environment.systemPackages = [ cfg.package ]; - users.users = singleton { - name = serviceName; + users.users."${serviceName}" = { description = "Heartbeat user"; home = cfg.dataDir; createHome = true; diff --git a/services/metricbeat.nix b/services/metricbeat.nix index aeb0489..e5e305a 100644 --- a/services/metricbeat.nix +++ b/services/metricbeat.nix @@ -119,8 +119,7 @@ in { config = lib.mkIf (cfg.enable) { environment.systemPackages = [ cfg.package ]; - users.users = singleton { - name = serviceName; + users.users."${serviceName}" = { description = "Metricbeat user"; home = cfg.dataDir; createHome = true;