{ lib, config, pkgs, ... }: let cfg = config.main-user; in { options = { main-user.enable = lib.mkEnableOption "enable user module"; main-user.userName = lib.mkOption { default = "mbessette"; description = "username"; }; }; config = lib.mkIf cfg.enable { users.users.${cfg.userName} = { isNormalUser = true; initialPassword = "12345"; description = "main user"; shell = pkgs.zsh; extraGroups = [ "networkmanager" "wheel" ]; packages = with pkgs; []; }; }; }