Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
39 lines
1.0 KiB
Nix
39 lines
1.0 KiB
Nix
{ lib, ... }:
|
|
{
|
|
name = "user-home-mode";
|
|
meta = with lib.maintainers; {
|
|
maintainers = [ fbeffa ];
|
|
};
|
|
|
|
nodes.machine = {
|
|
users.users.alice = {
|
|
initialPassword = "pass1";
|
|
isNormalUser = true;
|
|
};
|
|
users.users.bob = {
|
|
initialPassword = "pass2";
|
|
isNormalUser = true;
|
|
homeMode = "750";
|
|
};
|
|
users.users.carol = {
|
|
initialPassword = "pass3";
|
|
isNormalUser = true;
|
|
createHome = true;
|
|
home = "/users/carol";
|
|
};
|
|
};
|
|
|
|
testScript = ''
|
|
machine.wait_for_unit("multi-user.target")
|
|
machine.wait_for_unit("getty@tty1.service")
|
|
machine.wait_until_tty_matches("1", "login: ")
|
|
machine.send_chars("alice\n")
|
|
machine.wait_until_tty_matches("1", "Password: ")
|
|
machine.send_chars("pass1\n")
|
|
machine.succeed('[ "$(stat -c %a /home/alice)" == "700" ]')
|
|
machine.succeed('[ "$(stat -c %a /home/bob)" == "750" ]')
|
|
machine.succeed('[ "$(stat -c %a /users)" == "755" ]')
|
|
machine.succeed('[ "$(stat -c %a /users/carol)" == "700" ]')
|
|
'';
|
|
}
|