summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common.nix24
-rw-r--r--emacs-packages.nix2
-rw-r--r--groq.nix32
-rwxr-xr-xinstall.sh8
-rw-r--r--linux.nix134
-rw-r--r--packages.nix43
6 files changed, 181 insertions, 62 deletions
diff --git a/common.nix b/common.nix
index a80a165..0ac7c4c 100644
--- a/common.nix
+++ b/common.nix
@@ -162,17 +162,12 @@ in
export PS1='\n\[\e[34m\][\u@\h:\w]\[\e[m\] $(date +%Y.%m.%d..%H.%M) \n$ '
'';
shellAliases = {
- #z = "fasd_cd -d"; # cd, same functionality as j in autojump
- #zz = "fasd_cd -d -i"; # cd with interactive selection
- a = "fasd -a"; # any
- add = "git add --ignore-removal";
- ci = "git commit";
- d = "fasd -d"; # directory
- day = "date +%a";
- ddate = "date +%Y.%m.%d";
- dday = "date +%A";
- et = "emacs -nw"; # emacs in a terminal
- f = "fasd -f"; # file
+ 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";
@@ -190,18 +185,15 @@ in
pull = "git pull";
push = "git push";
rm = "rm -i";
- s = "fasd -si"; # show / search / select
- sd = "fasd -sid"; # interactive directory selection
- sf = "fasd -sif"; # interactive file selection
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 .";
- vs = "vim $(sk -m)";
- vk = "vim $(sk -m)";
vimdiff = "vim -d";
+ vk = "vim $(sk -m)";
+ vs = "vim $(sk -m)";
};
};
diff --git a/emacs-packages.nix b/emacs-packages.nix
index e01dfba..048d0f0 100644
--- a/emacs-packages.nix
+++ b/emacs-packages.nix
@@ -29,7 +29,7 @@ evil-collection
melpaStablePackages.evil-escape
#melpaStablePackages.evil-magit
evil-org
-evil-surround
+#evil-surround
emojify
eyebrowse
general
diff --git a/groq.nix b/groq.nix
new file mode 100644
index 0000000..f30d188
--- /dev/null
+++ b/groq.nix
@@ -0,0 +1,32 @@
+{ pkgs, ... }:
+
+let
+ gitCommitTemplate = ./git-commit-template;
+in
+{
+ imports = [
+ ./common.nix
+ ];
+ programs = {
+ emacs = {
+ enable = true;
+ extraPackages = epkgs: import ./emacs-packages.nix { inherit epkgs; };
+ };
+
+ git = {
+ enable = true;
+ userName = "Ben Sima";
+ userEmail = "bsima@groq.com";
+ ignores = [ "*~" "*.swp" ];
+ package = pkgs.gitAndTools.gitFull;
+ extraConfig = ''
+ [push]
+ default = simple
+
+ [commit]
+ template = ${gitCommitTemplate}
+ '';
+ };
+
+ };
+}
diff --git a/install.sh b/install.sh
index c00066d..360ffdd 100755
--- a/install.sh
+++ b/install.sh
@@ -1,5 +1,11 @@
#!/usr/bin/env bash
+if [ -z "$1" ]
+then
+ echo "usage: install.sh <file.nix>"
+ exit 1
+fi
+
echo "Symlinking directories"
mkdir -p ~/.config/nixpkgs
@@ -7,7 +13,7 @@ mkdir -p ~/.config/nixpkgs
NIXDIR="$HOME/.config/nixpkgs"
HOMEFILE="$NIXDIR/home.nix"
-NIXFILE="$(pwd)/$(uname | tr A-Z a-z).nix"
+NIXFILE="$(pwd)/$1"
[[ -e "$HOMEFILE" ]] || ln -s "$NIXFILE" "$HOMEFILE"
[[ -e "$NIXDIR/config.nix" ]] || ln -s "$(pwd)/config.nix" "$NIXDIR/config.nix"
diff --git a/linux.nix b/linux.nix
index 9d26562..7e606bc 100644
--- a/linux.nix
+++ b/linux.nix
@@ -2,6 +2,23 @@
let
homedir = builtins.getEnv "HOME";
+ cmdtree = stdenv.mkDerivation {
+ name = "cmdtree";
+ src = fetchGit {
+ url = "https://git.sr.ht/~jb55/cmdtree";
+ ref = "master";
+ rev = "5606078e8fa02462f0208d9f9cad98c7673812e6";
+ };
+ buildPhase = ''
+ cp ${./cfg.def.h} ./cfg.def.h
+ make
+ '';
+ installPhase = ''
+ mkdir -p $out/bin
+ cp ./cmdtree $out/bin
+ '';
+ buildInputs = [ pkgs.xorg.libX11 pkgs.xorg.libXft ];
+ };
base16-scheme = "spacemacs";
base16 = pkgs.stdenv.mkDerivation {
@@ -35,12 +52,83 @@ let
in
{
imports = [ ./common.nix ./email.nix ];
- home.packages = [
- pkgs.gnupg
- pkgs.pinentry
- pkgs.pavucontrol
- pkgs.keybase-gui
- ];
+ home = {
+ keyboard.options = [ "caps:ctrl_modifier" ];
+ file = {
+ mutt = {
+ text = (builtins.readFile ./muttrc) +
+ (builtins.readFile ./mutt/solarized.muttrc);
+ target = ".muttrc";
+ };
+ mailcap = {
+ source = ./mailcap;
+ target = ".mailcap";
+ };
+ tmux = {
+ source = ./tmux;
+ target = ".tmux.conf";
+ };
+ };
+
+ packages = with pkgs; [
+ gnupg
+ pinentry
+ pavucontrol
+ keybase-gui
+ cmdtree
+ bind
+ exercism
+ tmux
+ gnumake
+ dict
+ gopher
+ w3m
+ yank
+ beets
+ blueman
+ busybox
+ dmenu
+ dolphin
+ feh
+ flameshot
+ hledger
+ hledger-ui
+ hledger-web
+ ledger
+ libnotify
+ minitube
+ mplayer
+ muchsync
+ neomutt
+ obs-studio
+ pandoc
+ qutebrowser
+ tdesktop
+ texlive.combined.scheme-full
+ xorg.xmodmap
+ xournal
+ xterm
+ msmtp
+sqlite
+terminus
+mononoki
+pasystray
+pdftk
+youtube-dl
+zoom-us
+ glibcLocales # rofi locale fix -- https://github.com/rycee/home-manager/issues/354#issuecomment-415914278
+ vlc
+
+ # languages i regularly use
+ clojure
+ ghc
+ guile
+ ocaml
+ python3
+ lispPackages.quicklisp
+ sbcl
+ ];
+ };
fonts.fontconfig.enable = true;
xresources = {
@@ -276,6 +364,40 @@ in
};
programs = {
+ emacs = {
+ enable = true;
+ extraPackages = epkgs: import ./emacs-packages.nix { inherit epkgs; };
+ };
+
+ git = {
+ enable = true;
+ userName = "Ben Sima";
+ userEmail = "ben@bsima.me";
+ ignores = [ "*~" "*.swp" ];
+ package = pkgs.gitAndTools.gitFull;
+ signing = {
+ key = gpgid;
+ signByDefault = true;
+ };
+ aliases = {
+ authors = "shortlog -s -n";
+ };
+ extraConfig = ''
+ [push]
+ default = simple
+
+ [commit]
+ template = ${gitCommitTemplate}
+
+ [sendemail]
+ smtpuser = ben@bsima.me
+ smptserverport = 587
+ smptserver = mail.bsima.me
+ chainreplyto = false
+ composeencoding = UTF-8
+ '';
+ };
+
firefox = {
enable = true;
};
diff --git a/packages.nix b/packages.nix
index 37552e0..28e70a1 100644
--- a/packages.nix
+++ b/packages.nix
@@ -3,25 +3,7 @@
# All common packages go here. Linux-specific should go in `linux.nix'
with pkgs;
-let
- cmdtree = stdenv.mkDerivation {
- name = "cmdtree";
- src = fetchGit {
- url = "https://git.sr.ht/~jb55/cmdtree";
- ref = "master";
- rev = "5606078e8fa02462f0208d9f9cad98c7673812e6";
- };
- buildPhase = ''
- cp ${./cfg.def.h} ./cfg.def.h
- make
- '';
- installPhase = ''
- mkdir -p $out/bin
- cp ./cmdtree $out/bin
- '';
- buildInputs = [ pkgs.xorg.libX11 pkgs.xorg.libXft ];
- };
-in
+
[
ag
aspellDicts.en
@@ -35,11 +17,9 @@ dhall
dict
dmenu
dolphin
+cloc
entr
-exercism
expect
-fasd
-feh
file
flameshot
font-awesome_5
@@ -52,8 +32,6 @@ hledger-web
htop
ispell
jq
-ledger
-libnotify
lshw
lsof
material-icons
@@ -63,10 +41,7 @@ mplayer
msmtp
muchsync
ncdu
-neomutt
nix-prefetch-scripts
-obs-studio
-pandoc
pass
pasystray
pdftk
@@ -80,6 +55,9 @@ tdesktop
terminus
#texlive.combined.scheme-full
tmux
+ranger
+ripgrep
+shellcheck
tree
unrar
unzip
@@ -93,15 +71,4 @@ yank
youtube-dl
zathura
zip
-zoom-us
-
-# languages i regularly use
-clojure
-ghc
-guile
-ocaml
-python3
-lispPackages.quicklisp
-sbcl
-
]