From 89d5d191b48c502c84a4ed459ef3c9adc77a012a Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Sat, 30 Jun 2018 01:55:42 +0200 Subject: [PATCH] nixos/tests: users.(extraUsers|extraGroup->users|group) --- nixos/tests/atd.nix | 2 +- nixos/tests/common/user-account.nix | 4 ++-- nixos/tests/gitolite.nix | 4 ++-- nixos/tests/installer.nix | 2 +- nixos/tests/jenkins.nix | 4 ++-- nixos/tests/lightdm.nix | 2 +- nixos/tests/openssh.nix | 4 ++-- nixos/tests/pam-oath-login.nix | 2 +- nixos/tests/plasma5.nix | 2 +- nixos/tests/sddm.nix | 2 +- nixos/tests/slim.nix | 2 +- nixos/tests/sudo.nix | 2 +- nixos/tests/virtualbox.nix | 2 +- 13 files changed, 17 insertions(+), 17 deletions(-) diff --git a/nixos/tests/atd.nix b/nixos/tests/atd.nix index 5260c8ddfb8..ef848c2a374 100644 --- a/nixos/tests/atd.nix +++ b/nixos/tests/atd.nix @@ -9,7 +9,7 @@ import ./make-test.nix ({ pkgs, lib, ... }: machine = { config, pkgs, ... }: { services.atd.enable = true; - users.extraUsers.alice = { isNormalUser = true; }; + users.users.alice = { isNormalUser = true; }; }; # "at" has a resolution of 1 minute diff --git a/nixos/tests/common/user-account.nix b/nixos/tests/common/user-account.nix index 93aeb60e456..dc50e14750b 100644 --- a/nixos/tests/common/user-account.nix +++ b/nixos/tests/common/user-account.nix @@ -1,12 +1,12 @@ { lib, ... }: -{ users.extraUsers.alice = +{ users.users.alice = { isNormalUser = true; description = "Alice Foobar"; password = "foobar"; }; - users.extraUsers.bob = + users.users.bob = { isNormalUser = true; description = "Bob Foobar"; password = "foobar"; diff --git a/nixos/tests/gitolite.nix b/nixos/tests/gitolite.nix index 4b4e081acc5..d4028efad1d 100644 --- a/nixos/tests/gitolite.nix +++ b/nixos/tests/gitolite.nix @@ -78,8 +78,8 @@ in # there's nobody around that can input password PreferredAuthentications publickey ''; - users.extraUsers.alice = { isNormalUser = true; }; - users.extraUsers.bob = { isNormalUser = true; }; + users.users.alice = { isNormalUser = true; }; + users.users.bob = { isNormalUser = true; }; }; }; diff --git a/nixos/tests/installer.nix b/nixos/tests/installer.nix index 92f400937b9..8ce9bc21ff7 100644 --- a/nixos/tests/installer.nix +++ b/nixos/tests/installer.nix @@ -43,7 +43,7 @@ let boot.loader.systemd-boot.enable = true; ''} - users.extraUsers.alice = { + users.users.alice = { isNormalUser = true; home = "/home/alice"; description = "Alice Foobar"; diff --git a/nixos/tests/jenkins.nix b/nixos/tests/jenkins.nix index ed55b2ff587..25629efbfa4 100644 --- a/nixos/tests/jenkins.nix +++ b/nixos/tests/jenkins.nix @@ -18,7 +18,7 @@ import ./make-test.nix ({ pkgs, ...} : { # should have no effect services.jenkinsSlave.enable = true; - users.extraUsers.jenkins.extraGroups = [ "users" ]; + users.users.jenkins.extraGroups = [ "users" ]; systemd.services.jenkins.serviceConfig.TimeoutStartSec = "6min"; }; @@ -27,7 +27,7 @@ import ./make-test.nix ({ pkgs, ...} : { { config, pkgs, ... }: { services.jenkinsSlave.enable = true; - users.extraUsers.jenkins.extraGroups = [ "users" ]; + users.users.jenkins.extraGroups = [ "users" ]; }; }; diff --git a/nixos/tests/lightdm.nix b/nixos/tests/lightdm.nix index 97ec79406b8..d2b561fa67b 100644 --- a/nixos/tests/lightdm.nix +++ b/nixos/tests/lightdm.nix @@ -16,7 +16,7 @@ import ./make-test.nix ({ pkgs, ...} : { enableOCR = true; testScript = { nodes, ... }: let - user = nodes.machine.config.users.extraUsers.alice; + user = nodes.machine.config.users.users.alice; in '' startAll; $machine->waitForText(qr/${user.description}/); diff --git a/nixos/tests/openssh.nix b/nixos/tests/openssh.nix index b2d254e9d9d..230b4520684 100644 --- a/nixos/tests/openssh.nix +++ b/nixos/tests/openssh.nix @@ -17,7 +17,7 @@ in { services.openssh.enable = true; security.pam.services.sshd.limits = [ { domain = "*"; item = "memlock"; type = "-"; value = 1024; } ]; - users.extraUsers.root.openssh.authorizedKeys.keys = [ + users.users.root.openssh.authorizedKeys.keys = [ snakeOilPublicKey ]; }; @@ -29,7 +29,7 @@ in { services.openssh = { enable = true; startWhenNeeded = true; }; security.pam.services.sshd.limits = [ { domain = "*"; item = "memlock"; type = "-"; value = 1024; } ]; - users.extraUsers.root.openssh.authorizedKeys.keys = [ + users.users.root.openssh.authorizedKeys.keys = [ snakeOilPublicKey ]; }; diff --git a/nixos/tests/pam-oath-login.nix b/nixos/tests/pam-oath-login.nix index 4364d6e354a..eb5966d9213 100644 --- a/nixos/tests/pam-oath-login.nix +++ b/nixos/tests/pam-oath-login.nix @@ -30,7 +30,7 @@ in enable = true; }; - users.extraUsers.alice = { + users.users.alice = { isNormalUser = true; name = "alice"; uid = 1000; diff --git a/nixos/tests/plasma5.nix b/nixos/tests/plasma5.nix index 14ab2e30cab..e479d3f1cb8 100644 --- a/nixos/tests/plasma5.nix +++ b/nixos/tests/plasma5.nix @@ -41,7 +41,7 @@ import ./make-test.nix ({ pkgs, ...} : enableOCR = true; testScript = { nodes, ... }: let - user = nodes.machine.config.users.extraUsers.alice; + user = nodes.machine.config.users.users.alice; xdo = "${pkgs.xdotool}/bin/xdotool"; in '' startAll; diff --git a/nixos/tests/sddm.nix b/nixos/tests/sddm.nix index 1ce2b815784..ac91a89f669 100644 --- a/nixos/tests/sddm.nix +++ b/nixos/tests/sddm.nix @@ -21,7 +21,7 @@ let enableOCR = true; testScript = { nodes, ... }: let - user = nodes.machine.config.users.extraUsers.alice; + user = nodes.machine.config.users.users.alice; in '' startAll; $machine->waitForText(qr/select your user/i); diff --git a/nixos/tests/slim.nix b/nixos/tests/slim.nix index 7b939d83638..5c76c58cf3f 100644 --- a/nixos/tests/slim.nix +++ b/nixos/tests/slim.nix @@ -48,7 +48,7 @@ import ./make-test.nix ({ pkgs, ...} : { enableOCR = true; testScript = { nodes, ... }: let - user = nodes.machine.config.users.extraUsers.alice; + user = nodes.machine.config.users.users.alice; in '' startAll; $machine->waitForText(qr/Username:/); diff --git a/nixos/tests/sudo.nix b/nixos/tests/sudo.nix index 35addb0ee80..5d6c8691230 100644 --- a/nixos/tests/sudo.nix +++ b/nixos/tests/sudo.nix @@ -14,7 +14,7 @@ in { config, lib, pkgs, ... }: with lib; { - users.extraGroups = { foobar = {}; barfoo = {}; baz = { gid = 1337; }; }; + users.groups = { foobar = {}; barfoo = {}; baz = { gid = 1337; }; }; users.users = { test0 = { isNormalUser = true; extraGroups = [ "wheel" ]; }; test1 = { isNormalUser = true; password = password; }; diff --git a/nixos/tests/virtualbox.nix b/nixos/tests/virtualbox.nix index 249571fcede..008dab8459c 100644 --- a/nixos/tests/virtualbox.nix +++ b/nixos/tests/virtualbox.nix @@ -334,7 +334,7 @@ let virtualisation.memorySize = 2048; virtualisation.virtualbox.host.enable = true; services.xserver.displayManager.auto.user = "alice"; - users.extraUsers.alice.extraGroups = let + users.users.alice.extraGroups = let inherit (config.virtualisation.virtualbox.host) enableHardening; in lib.mkIf enableHardening (lib.singleton "vboxusers"); };