dont shorten
This commit is contained in:
parent
6fd92bdb5a
commit
06ca85ed52
1 changed files with 4 additions and 5 deletions
|
|
@ -1,11 +1,10 @@
|
|||
{ lib, config, ... }:
|
||||
let
|
||||
cfg = config.osbmModules;
|
||||
# Filter out 'root' from the users list since it's a special system user
|
||||
regularUsers = builtins.filter (u: u != "root") cfg.users;
|
||||
regularUsers = builtins.filter (u: u != "root") config.osbmModules.users;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf (cfg.users != [ ]) {
|
||||
config = lib.mkIf (config.osbmModules.users != [ ]) {
|
||||
users.users = lib.mkMerge [
|
||||
# Create users based on the list (excluding root)
|
||||
(lib.genAttrs regularUsers (username: {
|
||||
|
|
@ -14,14 +13,14 @@ in
|
|||
extraGroups = [
|
||||
"networkmanager"
|
||||
]
|
||||
++ lib.optional (username == cfg.defaultUser) "wheel"
|
||||
++ lib.optional (username == config.osbmModules.defaultUser) "wheel"
|
||||
++ lib.optional config.osbmModules.virtualization.docker.enable "docker"
|
||||
++ lib.optional config.osbmModules.programs.adbFastboot.enable "adbusers";
|
||||
}))
|
||||
|
||||
# Additional configuration for default user (including root if it's default)
|
||||
{
|
||||
${cfg.defaultUser} = {
|
||||
${config.osbmModules.defaultUser} = {
|
||||
openssh.authorizedKeys.keys = lib.mkDefault [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPfnV+qqUCJf92npNW4Jy0hIiepCJFBDJHXBHnUlNX0k"
|
||||
];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue