boxen/home/jez/home.nix

274 lines
5.0 KiB
Nix

{ config, pkgs, lib, ... }:
with builtins;
let
util = import ./util.nix { inherit pkgs; };
hostname = lib.strings.fileContents /etc/hostname;
host-config = ./machines + "/${hostname}.nix";
h = config.home.homeDirectory;
in {
programs.home-manager.enable = true;
imports = [
./bits/desktop.nix
./bits/sway.nix
./bits/shell.nix
./bits/firefox.nix
./bits/emacs.nix
./bits/vim.nix
./modules/gopass.nix
./modules/protonmail.nix
] ++ lib.lists.optional (pathExists host-config) host-config;
nixpkgs.config = {
allowUnfree = true;
joypixels.acceptLicense = true;
packageOverrides = pkgs:
let mypkgs = import ../../nixexprs { inherit pkgs; };
in {
nur = import (builtins.fetchTarball
"https://github.com/nix-community/NUR/archive/master.tar.gz") {
inherit pkgs;
};
inherit (mypkgs) dart-sass;
};
};
home.username = "jez";
# home.homeDirectory = h;
home.stateVersion = "20.09";
home.packages = with pkgs;
let python = python38.withPackages (py: with py; [ ipython sh invoke ]);
in [
nmap
avahi
iftop
s3cmd
dnsutils
whois
nixfmt
ncftp
nix-prefetch-git
gnutar
gzip
bzip2
zstd
zip
xz
p7zip
xar
yubikey-manager
yubioath-desktop
yubikey-personalization
yubikey-personalization-gui
gopass
tor
torsocks
transmission-gtk
unison
aspell
aspellDicts.en
aspellDicts.en-computers
bpytop
ranger
vifm
gomuks
toot
tut
lynx
w3m
amfora
rmapi
gmni
graphicsmagick
qrencode
mpc_cli
python
pipenv
pew
pandoc
texinfo
graphviz
zotero
bibtool
hugo
dart-sass
R
gcc_latest
sqlite
gnumake
cmake
libtool
libvterm
rustup
go
nodejs
yarn
ghc
stack
cabal-install
hlint
virt-manager
virt-viewer
];
home.sessionVariables = {
WORKON_HOME = "${h}/.local/lib/languages/Python/virtualenvs";
RUSTUP_HOME = "${h}/.local/lib/languages/Rust/rustup";
CABAL_CONFIG = "${h}/.config/cabal/config";
CABAL_DIR = "${h}/.local/lib/languages/Haskell/cabal";
EDITOR = pkgs.vim + /bin/vim;
TERMINFO_DIRS =
lib.concatStringsSep ":" [ "${h}/.nix-profile/share/terminfo" "" ];
};
home.file = {
".xprofile".source = ./dotfiles/xprofile;
".Rprofile".source = ./dotfiles/Rprofile;
"bin/shared".source = ./dotfiles/sharedbin;
".terminfo/x/xterm-kitty" = {
source = pkgs.kitty + /lib/kitty/terminfo/x/xterm-kitty;
recursive = true;
};
};
xdg = {
enable = true;
configFile = {
"ranger" = {
source = ./dotfiles/ranger;
recursive = true;
};
"cabal".source = ./dotfiles/cabal;
};
};
programs.man.generateCaches = true;
programs.git = {
enable = true;
aliases = {
st = "status";
ci = "commit";
co = "checkout";
h = "help";
a = "add";
d = "diff";
b = "branch";
m = "merge";
l = "log";
};
includes = [{ path = "~/.config/git/local"; }];
ignores = [
"*.pyc"
"*.log"
"*.aux"
"*.lol"
"*.out"
"*.toc"
"*.bcf"
"*.bbl"
"*.blg"
"*.nav"
"*.run.xml"
"*.snm"
"*.fdb_latexmk"
"*.fls"
"*.vrb"
"doc/tags"
".sass-cache"
".sconsign.dblite"
".*.sw[op]"
".DS_Store"
"._*"
"~$*"
".*.un~"
"*~"
"\\#*"
".\\#*"
"*.bak"
".~lock.*\\#"
".ipynb_checkpoints"
".stfolder"
".vscode"
".envrc"
];
extraConfig = {
color.ui = "auto";
push.default = "simple";
pull.rebase = "false";
github.user = "jezcope";
fetch.recurseSubmodules = "true";
init.defaultBranch = "main";
pager.branch = "false";
};
};
programs.gpg = {
enable = true;
settings = {
default-key = "0x9E42CE071C4559D1";
keyserver = "hkps://hkps.pool.sks-keyservers.net";
keyserver-options = "no-honor-keyserver-url include-revoked";
};
};
services.gpg-agent = {
enable = true;
enableScDaemon = true;
enableSshSupport = true;
defaultCacheTtl = 3600;
extraConfig = ''
no-allow-external-cache
'';
};
programs.gopass = {
enable = true;
password-store = "${h}/Reference/Passwords";
settings = { safecontent = true; };
};
programs.ssh = {
enable = true;
matchBlocks = {
"remarkable" = {
hostname = "10.11.99.1";
user = "root";
};
};
};
services.keybase.enable = true;
services.kbfs = {
enable = true;
mountPoint = "Keybase";
};
services.protonmail-bridge = { enable = true; };
programs.texlive = {
enable = true;
extraPackages = tpkgs: {
inherit (tpkgs) scheme-medium wrapfig capt-of multirow;
};
};
}