at main 469 B view raw
1{ lib, config, ... }: 2{ 3 options.my.username = lib.mkOption { 4 type = lib.types.str; 5 description = "The username for the current user."; 6 default = "kar"; 7 }; 8 9 config = lib.mkIf (config.my.username != "root") { 10 users.users.${config.my.username} = { 11 home = "/home/${config.my.username}"; 12 initialPassword = ""; 13 isNormalUser = true; 14 extraGroups = [ 15 "networkmanager" 16 "docker" 17 "wheel" 18 ]; 19 }; 20 }; 21}