diff --git a/home/neovim.nix b/home/neovim.nix index 5e19b90..a1a35a3 100644 --- a/home/neovim.nix +++ b/home/neovim.nix @@ -98,11 +98,14 @@ in { " Nerdtree-settings " Toggle nerdtree on Ctrl+t nmap :NERDTreeToggle - autocmd VimEnter * NERDTree " Autostart nerdtree on vim startup - autocmd VimEnter * wincmd p " Unselect nerdtree window " Close vim is Nerdtree is the only buffer left autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif + if empty($AERC_ACCOUNT) + autocmd VimEnter * NERDTree " Autostart nerdtree on vim startup + autocmd VimEnter * wincmd p " Unselect nerdtree window + endif + " List and switch buffers on Ctrl+k " nnoremap :set nomore :ls :set more :b nnoremap !echo "Did you mean C-a?" @@ -124,9 +127,7 @@ in { map :noh " Start with copilot disabled - if exists("*Copilot") - autocmd VimEnter * Copilot disable - endif + let g:copilot_enabled = 0 ''; }; diff --git a/home/zsh.nix b/home/zsh.nix index 38b7716..478850e 100644 --- a/home/zsh.nix +++ b/home/zsh.nix @@ -39,23 +39,30 @@ zstyle ':completion:*' special-dirs true export PATH="$HOME/.config/emacs/bin:$PATH" unalias "gs" + + if [ -f ~/.config/zsh-extras ]; then + source ~/.config/zsh-extras + fi ''; shellAliases = { - l = "exa -l"; c = "z"; - tree = "exa --tree --icons"; + em = "emacsclient -c"; + emnw = "emacsclient -nw"; + grep = "grep --color=auto"; + l = "exa -l"; + ls = "ls --color=auto"; + nd = "nix develop --command zsh"; s = "nix-shell --run zsh"; sp = "nix-shell --run zsh -p"; spu = "nix-shell -I nixpkgs=channel:nixos-unstable --run zsh -p"; - nd = "nix develop --command zsh"; - em = "emacsclient -c"; - emnw = "emacsclient -nw"; - gst = "git status -sb"; - gcm = "git commit -m"; - gps = "git push"; - gpl = "git pull"; + tree = "exa --tree --icons"; + "git clone git clone" = "git clone"; + gcm = "git commit -m"; + gpl = "git pull"; + gps = "git push"; + gst = "git status -sb"; }; }; diff --git a/hosts/felixalbpc/desktop/default.nix b/hosts/felixalbpc/desktop/default.nix index 9f4f846..652f2e6 100644 --- a/hosts/felixalbpc/desktop/default.nix +++ b/hosts/felixalbpc/desktop/default.nix @@ -97,5 +97,6 @@ }; location.provider = "geoclue2"; security.polkit.enable = true; + services.dbus.packages = [ pkgs.gcr ]; services.openssh.settings.X11Forwarding = true; } diff --git a/hosts/felixalbpc/home.nix b/hosts/felixalbpc/home.nix index 62f2b2d..157d0a7 100644 --- a/hosts/felixalbpc/home.nix +++ b/hosts/felixalbpc/home.nix @@ -1,5 +1,7 @@ { pkgs, lib, ... }: -{ +let + emailAddress = "felix.albrigtsen@ntnu.no"; +in { imports = [ ./../../home/base.nix ./../../home/alacritty.nix @@ -11,6 +13,7 @@ dante dig element-desktop + gnome.gnome-keyring hunspellDicts.en_US hunspellDicts.nb_NO jq @@ -22,8 +25,9 @@ openssl openstackclient pwgen - traceroute + rofi-rbw-x11 tlclient + traceroute w3m (python311.withPackages (ps: with ps; [ @@ -35,10 +39,21 @@ ]; programs = { - aerc.enable = true; + aerc = { + enable = true; + package = pkgs.unstable.aerc; + }; alacritty.enable = true; firefox.enable = true; - git.extraConfig.user.email = "felix.albrigtsen@ntnu.no"; + git.extraConfig.user.email = emailAddress; + rbw = { + enable = true; + settings = { + base_url = "https://bitwarden.it.ntnu.no"; + email = emailAddress; + pinentry = pkgs.pinentry-gnome3; + }; + }; rofi = { enable = true; theme = "iggy";