diff options
author | Ben Sima <ben@bsima.me> | 2019-08-27 14:34:49 -0700 |
---|---|---|
committer | Ben Sima <ben@bsima.me> | 2019-08-27 14:34:49 -0700 |
commit | f3b91d75d2d3153e9fa4d7414929dcc531779727 (patch) | |
tree | c49dc426b64cec2d47dc594a1a5398244ccc4dd0 /common.nix | |
parent | 8c810428d6d93ba718df7e8388615ad7fa3d092c (diff) |
reorganize, and some small fixes
Diffstat (limited to 'common.nix')
-rw-r--r-- | common.nix | 174 |
1 files changed, 0 insertions, 174 deletions
diff --git a/common.nix b/common.nix deleted file mode 100644 index 9f0315c..0000000 --- a/common.nix +++ /dev/null @@ -1,174 +0,0 @@ -{ pkgs, ... }: - -let - homedir = builtins.getEnv "HOME"; - locale = "en_US.UTF-8"; - gpgid = "D09299626FA78AF8"; -in -{ - home = { - packages = import ./packages.nix { inherit pkgs; }; - sessionVariables = { - GPGID = gpgid; - EDITOR = "emacsclient"; - LANG = locale; - LANGUAGE = locale; - PATH = "${homedir}/bin:${homedir}/.local/bin:$PATH"; - PAGER = "less"; - LEDGER_FILE = "${homedir}/.hledger.journal"; - XTERM_LOCALE = locale; - LOCALE_ARCHIVE = "${pkgs.glibcLocales}/lib/locale/locale-archive"; - }; - - # From the command line: - # setxkbmap -option caps:ctrl_modifier - keyboard.options = [ "caps:ctrl_modifier" ]; - - file = { - editorconfig = { - source = ./editorconfig; - target = ".editorconfig"; - }; - }; - }; - - programs = { - home-manager = { - enable = true; - path = "${homedir}/cfg/home-manager"; - }; - - tmux = { - enable = true; - extraConfig = builtins.readFile ./tmux; - baseIndex = 0; - clock24 = true; - customPaneNavigationAndResize = true; - keyMode = "vi"; - shortcut = "'C-\\'"; - terminal = "screen-256color"; - sensibleOnTop = true; - secureSocket = false; - }; - - ssh = { - enable = true; - forwardAgent = true; - matchBlocks = { - "sabten" = { - hostname = "142.93.81.26"; - user = "root"; - identityFile = [ "${homedir}/.ssh/id_rsa" ]; - identitiesOnly = true; - }; - "simatime.com" = { - hostname = "simatime.com"; - user = "git"; - identityFile = [ "${homedir}/.ssh/id_rsa" ]; - identitiesOnly = true; - }; - gh = { - hostname = "github.com"; - user = "git"; - identityFile = [ "${homedir}/.ssh/id_rsa" ]; - identitiesOnly = true; - }; - lithium = { - hostname = "69.181.254.154"; - user = "ben"; - identityFile = [ "${homedir}/.ssh/hijuj-zupip" ]; - identitiesOnly = true; - }; - nutin-madaj = { - hostname = "159.89.128.69"; - user = "root"; - identityFile = [ "${homedir}/.ssh/biz-deploy" ]; - identitiesOnly = true; - }; - hikuj-zupip = { - hostname = "69.181.254.154"; - user = "root"; - identityFile = [ "${homedir}/.ssh/biz-deploy" ]; - identitiesOnly = true; - }; - }; - }; - - direnv = { - enable = true; - }; - - skim = { - enable = true; - enableBashIntegration = true; - }; - - vim = { - enable = true; - plugins = [ - "ctrlp" - "fugitive" - "editorconfig-vim" - "surround" - "vim-colorschemes" - ]; - extraConfig = builtins.readFile ./vimrc; - }; - - bash = { - enable = true; - initExtra = '' - DIR=~/.nix-profile/etc/profile.d - [[ -f "$DIR/nix.sh" ]] && . "$DIR/nix.sh" - [[ -f "$DIR/hm-session-vars.sh" ]] && . "$DIR/hm-session-vars.sh" - [[ -f "$HOME/.bashrc.local" ]] && . "$HOME/.bashrc.local" - function cd() { - builtin cd "$@" && ls - } - - # my prompt, after much chagrin - export PS1='\n\[\e[34m\][\u@\h:\w]\[\e[m\] $(date +%Y.%m.%d..%H.%M) \n$ ' - ''; - shellAliases = { - add = "git add --ignore-removal"; - ci = "git commit"; - day = "date +%a"; - ddate = "date +%Y.%m.%d"; - dday = "date +%A"; - et = "emacs -nw"; # emacs in a terminal - fetch = "git fetch"; - g = "grep -in"; - ga = "git add -A"; - gb = "git branch"; - gc = "git commit"; - gca = "git commit -a"; - gco = "git checkout"; - gd = "git diff"; - gl = "git pull --prune"; - glog = ''git log --decorate --all --graph --pretty=format:"%Cred%h%Creset %an: %s - %Creset %C(yellow)%d%Creset %Cgreen(%cr)%Creset" --abbrev-commit --date=relative''; - gp = "git push origin HEAD"; - gs = "git status -sb"; - hs = "home-manager switch"; - ll = "ls -l"; - pull = "git pull"; - push = "git push"; - rm = "rm -i"; - showpath = "echo $PATH | sed 's/:/\n/g'"; - tdate = "date +%Y.%m.%d..%H.%M"; - ttime = "date +%H.%M"; - typeless = "history | tail -n 20000 | sed 's/.* //' | sort | uniq -c | sort -g | tail -n 100"; - v = "vim"; - "v." = "vim ."; - vimdiff = "vim -d"; - vk = "vim $(sk -m)"; - vs = "vim $(sk -m)"; - }; - }; - - emacs = { - enable = true; - # Disabling for spacemacs - #extraPackages = epkgs: import ./emacs-packages.nix { inherit epkgs; }; - }; - }; -} |