Merge pull request 'fix users in VM again' (#1966) from wayland into main

This commit is contained in:
clan-bot
2024-08-24 17:23:15 +00:00
3 changed files with 9 additions and 6 deletions

View File

@@ -48,7 +48,7 @@ let
boot.initrd.systemd.emergencyAccess = true;
# sysusers would be faster because it doesn't need perl, but it cannot create normal users
systemd.sysusers.enable = false;
systemd.sysusers.enable = true;
users.mutableUsers = false;
users.allowNoPasswordLogin = true;

View File

@@ -45,13 +45,16 @@
security.sudo.wheelNeedsPassword = false;
users.users.user = lib.mkIf (config.clan.services.waypipe.user == "user") {
isNormalUser = true;
uid = 1000;
password = "";
# workaround sysusers
isSystemUser = true;
uid = 998;
group = "users";
initialPassword = "";
extraGroups = [
"wheel"
"video"
];
home = "/home/user";
shell = "/run/current-system/sw/bin/bash";
};

View File

@@ -114,8 +114,8 @@ def test_vm_persistence(
"/var/user-state",
]
config["my_machine"]["users"]["users"] = {
"test": {"password": "test", "isNormalUser": True},
"root": {"password": "root"},
"test": {"initialPassword": "test", "isSystemUser": True, "group": "users"},
"root": {"initialPassword": "root"},
}
flake = generate_flake(