93 lines
1.8 KiB
Nix
93 lines
1.8 KiB
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
let
|
|
unstable = import <nixos-unstable> {};
|
|
in {
|
|
environment.systemPackages = with pkgs; [
|
|
bash
|
|
bash-completion
|
|
bat
|
|
direnv
|
|
fd
|
|
fzf
|
|
git
|
|
gnupg
|
|
htop
|
|
jq
|
|
ncdu
|
|
openssl
|
|
ripgrep
|
|
tcpdump
|
|
tmux
|
|
wget
|
|
z-lua
|
|
unzip
|
|
unstable.starship
|
|
(import ../packages/neovim.nix)
|
|
];
|
|
|
|
environment = {
|
|
etc = {
|
|
"starship.toml".source = ../dotfiles/starship.toml;
|
|
};
|
|
};
|
|
|
|
programs.bash = {
|
|
promptInit = ''
|
|
. <(starship init bash)
|
|
'';
|
|
interactiveShellInit = ''
|
|
export EDITOR=nvim
|
|
export STARSHIP_CONFIG=/etc/starship.toml
|
|
|
|
if [ -z "$SSH_AUTH_SOCK" ]; then
|
|
eval $(ssh-agent)
|
|
fi
|
|
|
|
set_win_title() {
|
|
echo -ne "\033]0;$USER@$HOSTNAME: $PWD\007"
|
|
}
|
|
starship_precmd_user_func=set_win_title
|
|
|
|
. "$(fzf-share)/key-bindings.bash"
|
|
. "$(fzf-share)/completion.bash"
|
|
. <(z --init bash)
|
|
. <(direnv hook bash)
|
|
. ${pkgs.bash-completion}/etc/profile.d/bash_completion.sh
|
|
|
|
for script in "$HOME"/dotfiles/bashrc/*.sh; do
|
|
. "$script"
|
|
done
|
|
|
|
if [[ -z $DISPLAY ]] \
|
|
&& [[ $(tty) = /dev/tty1 ]] \
|
|
&& [[ "$USER" = "stefan" ]] \
|
|
&& [[ -x /run/current-system/sw/bin/startsway ]]
|
|
then
|
|
exec startsway
|
|
fi
|
|
'';
|
|
|
|
shellAliases = {
|
|
cat = "bat -pp";
|
|
less = "bat -p";
|
|
ls = "ls --color=auto";
|
|
vim = "nvim";
|
|
};
|
|
};
|
|
|
|
users.users.stefan = {
|
|
extraGroups = [ "wheel" "dialout" ];
|
|
home = "/home/stefan";
|
|
isNormalUser = true;
|
|
uid = 1000;
|
|
};
|
|
|
|
security.sudo.extraConfig = ''
|
|
Defaults timestamp_timeout=5
|
|
Defaults env_keep+=SSH_AUTH_SOCK
|
|
'';
|
|
|
|
services.resolved.enable = true;
|
|
services.lorri.enable = true;
|
|
}
|