From 3727e7bd79fe75ff18b1dc6af494dbda940e0971 Mon Sep 17 00:00:00 2001 From: Benjamin Chausse Date: Thu, 14 Nov 2024 12:05:09 -0500 Subject: Batman --- common/main-user.nix | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 common/main-user.nix (limited to 'common/main-user.nix') diff --git a/common/main-user.nix b/common/main-user.nix new file mode 100644 index 0000000..4219b67 --- /dev/null +++ b/common/main-user.nix @@ -0,0 +1,44 @@ +{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 + ]; + + }; +} + + -- cgit v1.2.3