4 normaloHashedPassword = "$y$j9T$IEWqhKtWg.r.8fVkSEF56.$iKNxdMC6hOAQRp6eBtYvBk4c7BGpONXeZMqc8I/LM46";
7 services.userborn.enable = true;
8 boot.initrd.systemd.enable = true;
18 name = "userborn-immutable-etc";
20 meta.maintainers = with lib.maintainers; [ nikstur ];
31 hashedPassword = normaloHashedPassword;
36 specialisation.new-generation = {
37 inheritParentConfig = false;
40 inherit (config.nixpkgs) hostPlatform;
54 machine.wait_for_unit("userborn.service")
56 with subtest("normalo user is created"):
57 assert "${normaloHashedPassword}" in machine.succeed("getent shadow normalo"), "normalo user password is not correct"
60 machine.succeed("/run/current-system/specialisation/new-generation/bin/switch-to-configuration switch")
63 with subtest("normalo user is disabled"):
64 print(machine.succeed("getent shadow normalo"))
65 assert "!*" in machine.succeed("getent shadow normalo"), "normalo user is not disabled"
67 with subtest("new-normalo user is created after switching to new generation"):
68 print(machine.succeed("getent passwd new-normalo"))