summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xinstall.sh8
-rw-r--r--lib/afew.ini (renamed from afew.ini)4
-rw-r--r--lib/cfg.def.h (renamed from cfg.def.h)0
-rw-r--r--lib/common.nix (renamed from common.nix)21
-rw-r--r--lib/config.nix (renamed from config.nix)0
-rw-r--r--lib/editorconfig (renamed from editorconfig)0
-rw-r--r--lib/emacs-packages.nix (renamed from emacs-packages.nix)0
-rw-r--r--lib/email.nix (renamed from email.nix)5
-rw-r--r--lib/git-commit-template (renamed from git-commit-template)0
-rw-r--r--lib/mailcap (renamed from mailcap)0
-rw-r--r--lib/msmtprc (renamed from msmtprc)0
-rwxr-xr-xlib/mutt/generate-contacts.sh (renamed from mutt/generate-contacts.sh)0
-rw-r--r--lib/mutt/solarized.muttrc (renamed from mutt/solarized.muttrc)0
-rw-r--r--lib/muttrc (renamed from muttrc)0
-rw-r--r--lib/packages.nix (renamed from packages.nix)0
-rw-r--r--lib/tmux (renamed from tmux)24
-rw-r--r--lib/vimrc (renamed from vimrc)0
-rw-r--r--lib/xmonad.hs (renamed from xmonad.hs)4
-rw-r--r--linux.nix16
-rw-r--r--vim.nix16
20 files changed, 48 insertions, 50 deletions
diff --git a/install.sh b/install.sh
index 360ffdd..27513cc 100755
--- a/install.sh
+++ b/install.sh
@@ -16,18 +16,18 @@ HOMEFILE="$NIXDIR/home.nix"
NIXFILE="$(pwd)/$1"
[[ -e "$HOMEFILE" ]] || ln -s "$NIXFILE" "$HOMEFILE"
-[[ -e "$NIXDIR/config.nix" ]] || ln -s "$(pwd)/config.nix" "$NIXDIR/config.nix"
+[[ -e "$NIXDIR/config.nix" ]] || ln -s "$(pwd)/lib/config.nix" "$NIXDIR/config.nix"
# The notmuch config location is by default ~/.notmuch-config, but home-manager
# puts it at ~/.config/notmuch/notmuchrc (which makes sense) and then sets
# NOTMUCH_CONFIG. However, if a program for some reason doesn't read
# NOTMUCH_CONFIG (emacs), then it won't find the right config file, so I
# override with a symlink.
-
+#
mkdir -p ~/.config/notmuch
[[ -e ~/.notmuch-config ]] || ln -s ~/.config/notmuch/notmuchrc ~/.notmuch-config
-# Symlinking must occure before initial generation
-
+# Symlinking must occur before initial generation
+#
nix-shell ./home-manager -A install
diff --git a/afew.ini b/lib/afew.ini
index e27c3f4..48f86c5 100644
--- a/afew.ini
+++ b/lib/afew.ini
@@ -156,7 +156,7 @@ tags = -inbox;+usps
[Filter.26]
message = perfect workout marketing mails
query = from:admin@theperfectworkout.com
-tags = -inbox;-exercise
+tags = -inbox;+exercise
[Filter.27]
message = last bottle wines
@@ -175,7 +175,7 @@ tags = +sourcehut
[Filter.30]
message = urbit stuff
-query = to:dev@urbit.org OR subject:urbit
+query = subject:"[urbit-dev]" OR subject:"[urbit/*]"
tags = +urbit
# In order to unsubscribe I need to know by user/pass, which I do not...
diff --git a/cfg.def.h b/lib/cfg.def.h
index 7a024b2..7a024b2 100644
--- a/cfg.def.h
+++ b/lib/cfg.def.h
diff --git a/common.nix b/lib/common.nix
index 9f0315c..f2fb65d 100644
--- a/common.nix
+++ b/lib/common.nix
@@ -1,7 +1,6 @@
{ pkgs, ... }:
let
- homedir = builtins.getEnv "HOME";
locale = "en_US.UTF-8";
gpgid = "D09299626FA78AF8";
in
@@ -13,9 +12,9 @@ in
EDITOR = "emacsclient";
LANG = locale;
LANGUAGE = locale;
- PATH = "${homedir}/bin:${homedir}/.local/bin:$PATH";
+ PATH = "\$HOME/bin:\$HOME/.local/bin:$PATH";
PAGER = "less";
- LEDGER_FILE = "${homedir}/.hledger.journal";
+ LEDGER_FILE = "\$HOME/.hledger.journal";
XTERM_LOCALE = locale;
LOCALE_ARCHIVE = "${pkgs.glibcLocales}/lib/locale/locale-archive";
};
@@ -35,7 +34,7 @@ in
programs = {
home-manager = {
enable = true;
- path = "${homedir}/cfg/home-manager";
+ path = "\$HOME/cfg/home-manager";
};
tmux = {
@@ -45,7 +44,7 @@ in
clock24 = true;
customPaneNavigationAndResize = true;
keyMode = "vi";
- shortcut = "'C-\\'";
+ shortcut = "'C-a'";
terminal = "screen-256color";
sensibleOnTop = true;
secureSocket = false;
@@ -58,37 +57,37 @@ in
"sabten" = {
hostname = "142.93.81.26";
user = "root";
- identityFile = [ "${homedir}/.ssh/id_rsa" ];
+ identityFile = [ "\$HOME/.ssh/id_rsa" ];
identitiesOnly = true;
};
"simatime.com" = {
hostname = "simatime.com";
user = "git";
- identityFile = [ "${homedir}/.ssh/id_rsa" ];
+ identityFile = [ "\$HOME/.ssh/id_rsa" ];
identitiesOnly = true;
};
gh = {
hostname = "github.com";
user = "git";
- identityFile = [ "${homedir}/.ssh/id_rsa" ];
+ identityFile = [ "\$HOME/.ssh/id_rsa" ];
identitiesOnly = true;
};
lithium = {
hostname = "69.181.254.154";
user = "ben";
- identityFile = [ "${homedir}/.ssh/hijuj-zupip" ];
+ identityFile = [ "\$HOME/.ssh/hijuj-zupip" ];
identitiesOnly = true;
};
nutin-madaj = {
hostname = "159.89.128.69";
user = "root";
- identityFile = [ "${homedir}/.ssh/biz-deploy" ];
+ identityFile = [ "\$HOME/.ssh/biz-deploy" ];
identitiesOnly = true;
};
hikuj-zupip = {
hostname = "69.181.254.154";
user = "root";
- identityFile = [ "${homedir}/.ssh/biz-deploy" ];
+ identityFile = [ "\$HOME/.ssh/biz-deploy" ];
identitiesOnly = true;
};
};
diff --git a/config.nix b/lib/config.nix
index 7bdd27b..7bdd27b 100644
--- a/config.nix
+++ b/lib/config.nix
diff --git a/editorconfig b/lib/editorconfig
index c977887..c977887 100644
--- a/editorconfig
+++ b/lib/editorconfig
diff --git a/emacs-packages.nix b/lib/emacs-packages.nix
index 1c9606e..1c9606e 100644
--- a/emacs-packages.nix
+++ b/lib/emacs-packages.nix
diff --git a/email.nix b/lib/email.nix
index bde8fe9..811d739 100644
--- a/email.nix
+++ b/lib/email.nix
@@ -1,20 +1,19 @@
{ pkgs, ... }:
let
- homedir = builtins.getEnv "HOME";
gpgid = "D09299626FA78AF8";
in
{
accounts = {
email = {
- maildirBasePath = "${homedir}/Mail";
+ maildirBasePath = "\$HOME/Mail";
accounts = {
"ben@bsima.me" = {
primary = true;
realName = "Ben Sima";
address = "ben@bsima.me";
userName = "ben@simatime.com";
- alot.sendMailCommand = "${homedir}/bin/sendmail";
+ alot.sendMailCommand = "\$HOME/bin/sendmail";
folders = {
inbox = "INBOX";
};
diff --git a/git-commit-template b/lib/git-commit-template
index 13f37b6..13f37b6 100644
--- a/git-commit-template
+++ b/lib/git-commit-template
diff --git a/mailcap b/lib/mailcap
index 5cce027..5cce027 100644
--- a/mailcap
+++ b/lib/mailcap
diff --git a/msmtprc b/lib/msmtprc
index 096525f..096525f 100644
--- a/msmtprc
+++ b/lib/msmtprc
diff --git a/mutt/generate-contacts.sh b/lib/mutt/generate-contacts.sh
index ab3cacb..ab3cacb 100755
--- a/mutt/generate-contacts.sh
+++ b/lib/mutt/generate-contacts.sh
diff --git a/mutt/solarized.muttrc b/lib/mutt/solarized.muttrc
index 3588389..3588389 100644
--- a/mutt/solarized.muttrc
+++ b/lib/mutt/solarized.muttrc
diff --git a/muttrc b/lib/muttrc
index ebbcdb0..ebbcdb0 100644
--- a/muttrc
+++ b/lib/muttrc
diff --git a/packages.nix b/lib/packages.nix
index 849cbe6..849cbe6 100644
--- a/packages.nix
+++ b/lib/packages.nix
diff --git a/tmux b/lib/tmux
index efa1a63..c292416 100644
--- a/tmux
+++ b/lib/tmux
@@ -1,5 +1,7 @@
# vim: filetype=tmux
-
+#
+# More settings are in common.nix
+#
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
@@ -9,6 +11,9 @@ set -g xterm-keys on
setw -g mouse on
setw -g monitor-activity on
+## Panes
+
+# Split panes
bind-key v split-window -h
bind-key s split-window -v
@@ -19,15 +24,20 @@ bind -n M-k select-pane -U
bind -n M-l select-pane -R
# Use Alt-arrow keys without prefix key to switch panes
-bind -n M-Left select-pane -L
+bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
-bind -n M-Up select-pane -U
-bind -n M-Down select-pane -D
+bind -n M-Up select-pane -U
+bind -n M-Down select-pane -D
# Shift arrow to switch windows
bind -n S-Left previous-window
bind -n S-Right next-window
+# Set current window pane to 80 columns
+bind-key 8 resize-pane -x 80
+
+## Text manipulation
+
# vim-like copy/paste
setw -g mode-keys vi
@@ -40,6 +50,8 @@ bind-key -Tcopy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -sel clip -i'
# buffer
bind Space choose-buffer
+## Meta
+
# Reload tmux config
bind r source-file ~/.tmux.conf
@@ -49,6 +61,6 @@ set -g status-left ' #(whoami)@#(hostname) | '
set -g status-right '~%Y.%m.%d..%H.%M '
# white-ish background with dark-grey text
-set -g status-style bg=colour7
-set -ag status-style fg=colour10
+set -g status-style bg=colour0
+set -ag status-style fg=colour13
diff --git a/vimrc b/lib/vimrc
index f585f90..f585f90 100644
--- a/vimrc
+++ b/lib/vimrc
diff --git a/xmonad.hs b/lib/xmonad.hs
index 30fe52a..8b93acc 100644
--- a/xmonad.hs
+++ b/lib/xmonad.hs
@@ -68,6 +68,10 @@ insKeys conf@(XConfig {modMask = modMask}) =
, ((modMask, xK_m), spawn "cmdtree")
, ((modMask, xK_o), spawn "cmdtree")
+ -- restart xmonad nia home-manager
+ , ((modMMask, xK_r)
+ , spawn "$HOME/.nix-profile/bin/xmonad --recompile && $HOME/.nix-profile/bin/xmonad --restart")
+
-- sticky windows
, ((modMask, xK_a ), windows copyToAll) -- @@ Make focused window always visible
, ((modMask .|. shiftMask, xK_a ), killAllOtherCopies) -- @@ Toggle window state back
diff --git a/linux.nix b/linux.nix
index 9201647..3d3dbd5 100644
--- a/linux.nix
+++ b/linux.nix
@@ -2,7 +2,7 @@
let
homedir = builtins.getEnv "HOME";
- gitCommitTemplate = ./git-commit-template;
+ gitCommitTemplate = ./lib/git-commit-template;
gpgid = "D09299626FA78AF8";
cmdtree = pkgs.stdenv.mkDerivation {
name = "cmdtree";
@@ -12,7 +12,7 @@ let
rev = "5606078e8fa02462f0208d9f9cad98c7673812e6";
};
buildPhase = ''
- cp ${./cfg.def.h} ./cfg.def.h
+ cp ${./lib/cfg.def.h} ./cfg.def.h
make
'';
installPhase = ''
@@ -53,17 +53,17 @@ let
};
in
{
- imports = [ ./common.nix ./email.nix ];
+ imports = [ ./lib/common.nix ./lib/email.nix ];
home = {
keyboard.options = [ "caps:ctrl_modifier" ];
file = {
mutt = {
- text = (builtins.readFile ./muttrc) +
- (builtins.readFile ./mutt/solarized.muttrc);
+ text = (builtins.readFile ./lib/muttrc) +
+ (builtins.readFile ./lib/mutt/solarized.muttrc);
target = ".muttrc";
};
mailcap = {
- source = ./mailcap;
+ source = ./lib/mailcap;
target = ".mailcap";
};
};
@@ -352,7 +352,7 @@ in
#hpkgs.taffybar
];
enableContribAndExtras = true;
- config = ./xmonad.hs;
+ config = ./lib/xmonad.hs;
};
};
};
@@ -389,7 +389,7 @@ in
emacs = {
enable = true;
- extraPackages = epkgs: import ./emacs-packages.nix { inherit epkgs; };
+ extraPackages = epkgs: import ./lib/emacs-packages.nix { inherit epkgs; };
};
firefox = {
diff --git a/vim.nix b/vim.nix
deleted file mode 100644
index 57f79ba..0000000
--- a/vim.nix
+++ /dev/null
@@ -1,16 +0,0 @@
-{ ... }:
-
-{
- programs.vim = {
- enable = true;
- plugins = [
- "ctrlp"
- "fugitive"
- "editorconfig-vim"
- "surround"
- "vim-colorschemes"
- "vim-ripgrep"
- ];
- extraConfig = builtins.readFile ../vimrc;
- };
-}