infrastructure/nixos/common/users/default.nix
Victor d22f444fc5
Some checks failed
Lint / lint (push) Failing after 1m33s
Plex Update / update (push) Successful in 1m52s
fix lints
2023-12-24 12:27:59 +01:00

60 lines
1.5 KiB
Nix

{ config, pkgs, lib, ... }: {
imports = [ ./laura.nix ./vivian.nix ./jonathan.nix ];
programs = {
# Setup ZSH to use grml config
zsh = {
enable = true;
enableCompletion = true;
syntaxHighlighting.enable = true;
autosuggestions.enable = true;
interactiveShellInit = ''
source "${pkgs.grml-zsh-config}/etc/zsh/zshrc"
export FZF_DEFAULT_COMMAND="${pkgs.ripgrep}/bin/rg --files --follow"
source "${pkgs.fzf}/share/fzf/key-bindings.zsh"
source "${pkgs.fzf}/share/fzf/completion.zsh"
eval "$(${pkgs.zoxide}/bin/zoxide init zsh)"
'';
# otherwise it'll override the grml prompt
promptInit = "";
};
# Install Neovim and set it as alias for vi(m)
neovim = {
enable = true;
viAlias = true;
vimAlias = true;
defaultEditor = true;
};
tmux.enable = true;
};
environment.pathsToLink = [ "/share/zsh" ];
# Disable sudo prompt for `wheel` users.
security.sudo.wheelNeedsPassword = lib.mkDefault false;
# Configure the root account
users.extraUsers.root = {
# Allow my SSH keys for logging in as root.
openssh.authorizedKeys.keys =
config.users.extraUsers.vivian.openssh.authorizedKeys.keys;
# Also use zsh for root
shell = pkgs.zsh;
};
# Setup packages available everywhere
environment.systemPackages = with pkgs; [
file
fzf
git
htop
ncdu
psmisc
helix
ripgrep
rsync
zoxide
];
}