{lib, config, pkgs, programs, environment, ...}: let cfg = config.main-user; in { options.main-user = { enable = lib.mkEnableOption "enable user module"; userName = lib.mkOption { default = "master"; description = '' username ''; }; }; config = lib.mkIf config.main-user.enable { programs.zsh.enable = true; users.groups.plugdev = {}; users.users.${config.main-user.userName} = { isNormalUser = true; initialPassword = "password1324"; description = "Benjamin Chausse"; group = "wheel"; extraGroups = ["plugdev" "networkmanager" "docker" "mlocate"]; shell = pkgs.zsh; }; environment.systemPackages = with pkgs; [ git yadm neovim zsh zsh-syntax-highlighting ]; }; }