From 37f1e87030a90fe06b723b88bb6e5b203dc169df Mon Sep 17 00:00:00 2001 From: shynd Date: Thu, 20 Feb 2025 13:57:02 +0100 Subject: [PATCH] added users.nix --- hosts/default/users.nix | 66 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 hosts/default/users.nix diff --git a/hosts/default/users.nix b/hosts/default/users.nix new file mode 100644 index 0000000..4c7ef02 --- /dev/null +++ b/hosts/default/users.nix @@ -0,0 +1,66 @@ +# users - note: packages defined here will only be installed for the current user + +{ pkgs, username, ... }: + +let + inherit (import ./variables.nix) gitUsername; +in +{ + users = { + mutableUsers = true; + users."${username}" = { + homeMode = "755"; + isNormalUser = true; + description = "${gitUsername}"; + extraGroups = [ + "networkmanager" + "wheel" + "libvirtd" + "scanner" + "lp" + "video" + "input" + "audio" + ]; + + # define user packages here + packages = with pkgs; [ + + ]; + }; + + defaultUserShell = pkgs.zsh; + }; + + environment.shells = with pkgs; [ zsh ]; + environment.systemPackages = with pkgs; [ fzf ]; + + programs = { + # zsh configuration + zsh = { + enable = true; + enableCompletion = true; + ohMyZsh = { + enable = true; + plugins = [ "git" ]; + theme = "funky"; + }; + + autosuggestions.enable = true; + syntaxHighlighting.enable = true; + + promptInit = '' + fastfetch -c $HOME/.config/fastfetch/config-compact.jsonc + + #pokemon colorscripts like. Make sure to install krabby package + #krabby random --no-mega --no-gmax --no-regional --no-title -s; + + source <(fzf --zsh); + HISTFILE=~/.zsh_history; + HISTSIZE=10000; + SAVEHIST=10000; + setopt appendhistory; + ''; + }; + }; +} \ No newline at end of file