infrastructure/nixos/common/users/default.nix

56 lines
1.3 KiB
Nix
Raw Normal View History

2023-05-04 13:08:10 +02:00
{ config, pkgs, lib, ... }: {
imports = [ ./laura.nix ./victor.nix ];
2022-10-03 21:25:57 +02:00
2021-10-13 18:17:45 +02:00
# Setup ZSH to use grml config
programs.zsh = {
enable = true;
enableCompletion = true;
syntaxHighlighting.enable = true;
interactiveShellInit = ''
source "${pkgs.grml-zsh-config}/etc/zsh/zshrc"
2021-10-17 23:34:05 +02:00
export FZF_DEFAULT_COMMAND="${pkgs.ripgrep}/bin/rg --files --follow"
2021-10-13 18:17:45 +02:00
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 = "";
};
2022-07-30 12:22:08 +02:00
2021-10-13 18:17:45 +02:00
environment.pathsToLink = [ "/share/zsh" ];
2021-11-03 00:52:39 +01:00
# Install Neovim and set it as alias for vi(m)
2022-08-30 22:38:00 +02:00
programs.neovim = {
enable = true;
viAlias = true;
2023-05-30 09:58:17 +02:00
vimAlias = true;
defaultEditor = true;
2022-08-30 22:38:00 +02:00
};
2021-11-03 00:52:39 +01:00
2021-10-13 18:17:45 +02:00
# Disable sudo prompt for `wheel` users.
2022-08-30 22:38:00 +02:00
security.sudo.wheelNeedsPassword = lib.mkDefault false;
2021-10-13 18:17:45 +02:00
# Configure the root account
users.extraUsers.root = {
# Allow my SSH keys for logging in as root.
2023-05-04 13:08:10 +02:00
openssh.authorizedKeys.keys =
config.users.extraUsers.victor.openssh.authorizedKeys.keys;
2021-10-13 18:17:45 +02:00
# Also use zsh for root
shell = pkgs.zsh;
};
# Setup packages available everywhere
2022-09-05 14:52:11 +02:00
environment.systemPackages = with pkgs; [
fzf
git
htop
ncdu
2022-10-08 17:05:22 +02:00
psmisc
2022-09-05 14:52:11 +02:00
ripgrep
rsync
2023-05-07 18:43:10 +02:00
tmux
2022-09-05 14:52:11 +02:00
zoxide
2023-05-03 22:42:47 +02:00
tmux
2022-09-05 14:52:11 +02:00
];
2021-10-13 18:17:45 +02:00
}