Merge pull request 'fix users in VM again' (#1966) from wayland into main
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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";
|
||||
};
|
||||
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user