summary refs log tree commit diff stats
path: root/user/modules/zsh.nix
diff options
context:
space:
mode:
authorAlan Pearce2019-10-08 21:44:57 +0200
committerAlan Pearce2019-10-08 21:44:57 +0200
commit0a50d682ec85bf023bebd68a3ca388001f0c0677 (patch)
tree3f725c5a36633ec5b59df37f156a03ee2a971656 /user/modules/zsh.nix
parent40fd4964068d0b7628b6f699dab4aec200eadb0a (diff)
downloadnixfiles-0a50d682ec85bf023bebd68a3ca388001f0c0677.tar.lz
nixfiles-0a50d682ec85bf023bebd68a3ca388001f0c0677.tar.zst
nixfiles-0a50d682ec85bf023bebd68a3ca388001f0c0677.zip
mv modules settings
Diffstat (limited to 'user/modules/zsh.nix')
-rw-r--r--user/modules/zsh.nix181
1 files changed, 0 insertions, 181 deletions
diff --git a/user/modules/zsh.nix b/user/modules/zsh.nix
deleted file mode 100644
index 467c426b..00000000
--- a/user/modules/zsh.nix
+++ /dev/null
@@ -1,181 +0,0 @@
-{ config, pkgs, ... }:
-
-let
-  inherit (pkgs) stdenv;
-  lsOptions = if stdenv.isDarwin then "-p" else "-v --group-directories-first";
-  lsIsoDate = if stdenv.isDarwin then "" else "--time-style=long-iso";
-in
-{
-  home.file = {
-    ".rm_recycle_home".text = ""; # use trash automatically in home directory
-  };
-  home.packages = with pkgs; [
-    fzf
-    ghq
-  ] ++ (if stdenv.isDarwin
-  then []
-  else [
-    pkgs.git
-  ]);
-  xdg.configFile.zsh = {
-    recursive = true;
-    source = ../zsh/.config/zsh;
-  };
-
-  home.file.".zplugin/bin" = {
-    source = pkgs.fetchFromGitHub {
-      owner = "zdharma";
-      repo = "zplugin";
-      rev = "028b1e1d6d3eae204b499c7f815f4eeeb5051517";
-      sha256 = "1ynh323905iia3gwi9qghbywp94x306nna1yqk37frj5g7kg90fa";
-    };
-  };
-
-  programs.zsh = {
-    enable = true;
-
-    enableAutosuggestions = true;
-    enableCompletion = true;
-    defaultKeymap = "emacs";
-
-    dotDir = ".config/zsh";
-
-    history = {
-      expireDuplicatesFirst = true;
-      extended = true;
-      path = ".cache/zsh/history";
-      save = 20000;
-      size = 10000;
-    };
-
-    localVariables = {
-      ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE = "fg=7";
-    };
-
-    shellAliases = {
-      l = "ls ${lsOptions} -Bp";
-      l1="ls -1";
-      ls="ls ${lsOptions} -hF";
-      la="ls ${lsOptions} -hA";
-      ll="ls ${lsOptions} ${lsIsoDate} -hl";
-      lal="ll -A";
-      lla="lal";
-      llr="ll -t";
-
-      https = "http --default-scheme https";
-      kns = "kubens";
-      kx = "kubectx";
-      ava = "pnpx ava";
-      avt = "pnpx ava --tap";
-      avat = "pnpx ava --tap";
-      pino = "pino-pretty";
-      mocha = "pnpx mocha";
-      prettier = "pnpx prettier";
-      standard = "pnpx standard";
-      tsc = "pnpx tsc";
-      tslint = "pnpx tslint";
-      tsnode = "pnpx ts-node";
-
-      history = "fc -l $(( $LINES - 2 ))";
-      hist-freq-lines = "fc -l -2000 | cut -d' ' -f4- | sort | uniq -c | sort -g | tail -n100 | less";
-      hist-freq-commands = "fc -l -2000 | cut -d' ' -f4 | sort | uniq -c | sort -g | tail -n10 | less";
-      wprop = "xprop | egrep '^WM_(CLASS|NAME|WINDOW_ROLE|TYPE)'";
-
-      # Enable the following commands to support aliases.
-      sudo = "sudo ";
-      watch = "watch ";
-
-      g = "rg";
-
-      ga = "git add";
-      gi = "git";
-      gs = "git st";
-      gd = "git diff";
-      gf = "git fetch";
-      gk = "git push";
-      gj = "git pull";
-      gl = "git lg";
-      gr = "git remote";
-      gz = "git stash";
-      gzl = "git stash list";
-      gzp = "git stash pop";
-      gdt = "git difftool";
-      grl = "git reflog";
-      gri = "git rebase --interactive";
-      grs = "git reset";
-      grsh = "git reset --hard";
-      gsh = "git show";
-      gsm = "git submodule";
-      gci = "git commit";
-      gco = "git checkout";
-      gbr = "git br";
-      gbrc = "git checkout -b";
-      gbrd = "git branch --delete";
-      gbrm = "git branch --move";
-      gmup = "git mup";
-      grup = "git rup";
-
-      hos = "home-manager switch";
-      hon = "home-manager news";
-      hoh = "home-manager-help";
-
-      n = "nix-env";
-      ni = "nix-env -iA";
-      nq = "nix-env -q";
-      ne = "nix-env -e";
-      nup = "nix-env -u";
-      ngc = "nix-collect-garbage --delete-older-than 14d";
-    };
-
-    # move to envExtra after 19.09
-    initExtra = ''
-      case $OSTYPE in
-        darwin*)
-          os=darwin
-          ;;
-        linux-gnu)
-          os=linux
-          ;;
-        freebsd*)
-          os=freebsd
-          ;;
-        *)
-          os=unknown
-          ;;
-      esac
-
-      case $MACHTYPE in
-        *64)
-          arch=amd64
-          ;;
-        *)
-          arch=386
-          ;;
-      esac
-      if [[ ''${path[(I)$HOME/.local/bin ]} ]]
-      then
-        path+=($HOME/.local/bin)
-      fi
-
-      if [[ ''${path[(I)$HOME/go/bin ]} ]]
-      then
-        path+=($HOME/go/bin)
-      fi
-
-      if [[ $HOST =~ satoshi ]]
-      then
-        EMAIL=alan@satoshipay.io
-      else
-        EMAIL=alan@alanpearce.eu
-      fi
-
-      typeset -T GHQ_ROOT ghq_root
-      export GHQ_ROOT="$HOME/projects:$HOME/go/src:$HOME/quicklisp/local-projects"
-
-      function hist-freq-subcommands () {
-        fc -l -m "$1*" -2000 | cut -d' ' -f4- | sort | uniq -c | sort -g | tail -n100 | less
-      }
-
-    '' + builtins.readFile ../zsh/.config/zsh/.zshrc;
-  };
-}