boxen/home/default.nix

297 lines
5.4 KiB
Nix
Raw Normal View History

2021-05-24 10:44:05 +00:00
{ config, pkgs, lib, nixosConfig, ... }:
with builtins;
let
2021-06-08 16:03:20 +00:00
inherit (nixosConfig.networking) hostName;
host-config = ./machines + "/${hostName}.nix";
h = config.home.homeDirectory;
2021-10-20 17:56:56 +00:00
editor-script = pkgs.writeScriptBin "edit" ''
#!${pkgs.zsh}/bin/zsh
${config.programs.emacs.package}/bin/emacsclient -t $*
'';
2020-11-21 15:51:37 +00:00
in {
programs.home-manager.enable = true;
2021-07-25 19:23:05 +00:00
imports = [ ./modules ./profiles ]
++ lib.lists.optional (pathExists host-config) host-config;
2021-05-24 09:23:07 +00:00
home.username = "jez";
home.stateVersion = "20.09";
home.packages = with pkgs;
2021-06-24 19:25:17 +00:00
let
2022-08-23 19:53:58 +00:00
python = (python3.withPackages (py:
with py; [
ipython
sh
invoke
cookiecutter
pyflakes
black
isort
arrow
numpy
pandas
requests
httpx
2022-05-30 19:35:36 +00:00
furl
2022-07-27 15:16:46 +00:00
jupyterlab
2022-08-23 19:53:58 +00:00
])).override (args: { ignoreCollisions = true; });
2021-06-24 19:25:17 +00:00
ghc = haskellPackages.ghcWithPackages (pkgs: [ pkgs.tidal ]);
in [
2022-04-16 19:08:22 +00:00
httpie
2020-11-21 15:51:37 +00:00
nmap
avahi
iftop
s3cmd
dnsutils
gnutls
inetutils
2020-11-21 15:51:37 +00:00
nixfmt
2021-01-27 18:54:57 +00:00
ncftp
2020-11-24 13:06:48 +00:00
nix-prefetch-git
2021-06-08 16:03:29 +00:00
nix-index
mercurialFull
2022-08-23 19:56:14 +00:00
pijul
2021-06-01 20:36:05 +00:00
weechat
2021-09-05 13:13:14 +00:00
borgbackup
2021-09-11 12:54:03 +00:00
mblaze
2020-11-21 15:51:37 +00:00
2021-02-15 10:00:47 +00:00
gnutar
gzip
bzip2
zstd
zip
xz
p7zip
xar
2020-11-21 15:51:37 +00:00
yubikey-manager
yubioath-desktop
yubikey-personalization
yubikey-personalization-gui
2021-07-16 07:50:14 +00:00
lastpass-cli
2020-11-21 15:51:37 +00:00
tor
torsocks
transmission-gtk
unison
(aspellWithDicts (dicts: with dicts; [ en en-computers en-science ]))
(hunspellWithDicts (with hunspellDicts; [ en_GB-large en_US ]))
2020-11-21 15:51:37 +00:00
2022-08-23 19:56:14 +00:00
btop
2020-11-21 15:51:37 +00:00
ranger
2021-10-11 19:55:00 +00:00
bat
2021-03-28 15:21:33 +00:00
toot
tut
lynx
w3m
amfora
2021-03-10 17:28:30 +00:00
rmapi
2021-04-11 19:58:41 +00:00
gmni
2020-11-21 15:51:37 +00:00
graphicsmagick
qrencode
mpc_cli
2021-02-08 17:06:06 +00:00
python
2020-11-21 15:51:37 +00:00
pipenv
pew
2021-10-16 19:27:48 +00:00
poetry
2020-11-21 15:51:37 +00:00
pandoc
graphviz
zotero
2021-02-26 20:51:37 +00:00
bibtool
biber
2022-04-19 20:11:41 +00:00
mdbook
2020-11-21 15:51:37 +00:00
R
gcc_latest
sqlite
gnumake
cmake
libtool
libvterm
rustup
go
2021-10-21 07:44:49 +00:00
gocode
gore
2022-03-12 18:38:57 +00:00
gotools
2021-10-21 07:44:49 +00:00
gotests
gomodifytags
nodejs
yarn
ghc
stack
cabal-install
hlint
2021-12-01 14:25:33 +00:00
lazygit
lazydocker
2020-11-21 15:51:37 +00:00
virt-manager
virt-viewer
];
home.sessionVariables = {
2020-11-10 09:08:56 +00:00
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";
2021-10-21 07:44:49 +00:00
GOPATH = "${h}/.local/lib/languages/Go";
2021-10-20 17:56:56 +00:00
EDITOR = editor-script + /bin/edit;
2021-10-26 19:49:09 +00:00
ALTERNATE_EDITOR = pkgs.vim + /bin/vim;
};
home.file = {
".xprofile".source = ./dotfiles/xprofile;
".Rprofile".source = ./dotfiles/Rprofile;
".terminfo/x/xterm-kitty" = {
source = pkgs.kitty + /lib/kitty/terminfo/x/xterm-kitty;
recursive = true;
};
};
2020-11-24 21:06:24 +00:00
xdg = {
enable = true;
configFile = {
"ranger" = {
source = ./dotfiles/ranger;
recursive = true;
};
2020-11-24 21:06:24 +00:00
"cabal".source = ./dotfiles/cabal;
};
};
2021-09-16 11:02:31 +00:00
programs.info.enable = true;
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";
};
2020-11-21 15:51:37 +00:00
includes = [{ path = "~/.config/git/local"; }];
ignores = [
"*.pyc"
2020-11-21 15:51:37 +00:00
"*.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";
2022-04-26 14:52:21 +00:00
keyserver = "hkps://keys.openpgp.org";
keyserver-options = "no-honor-keyserver-url include-revoked";
};
};
services.gpg-agent = {
enable = true;
enableScDaemon = true;
enableSshSupport = true;
defaultCacheTtl = 3600;
extraConfig = ''
no-allow-external-cache
'';
};
2021-02-08 17:05:21 +00:00
programs.gopass = {
enable = true;
2022-05-09 20:03:25 +00:00
jsonAPI.enable = true;
2021-02-08 17:05:21 +00:00
password-store = "${h}/Reference/Passwords";
2021-03-28 15:21:33 +00:00
settings = { safecontent = true; };
2021-02-08 17:05:21 +00:00
};
2021-02-08 17:05:30 +00:00
programs.ssh = {
enable = true;
matchBlocks = {
"remarkable" = {
hostname = "10.11.99.1";
user = "root";
};
2021-08-05 17:29:31 +00:00
"git.emacsconf.org" = {
port = 22;
user = "anon";
identityFile = "~/.ssh/id_rsa_anon_git_emacsconf";
};
2021-02-08 17:05:30 +00:00
};
};
2022-07-04 10:32:46 +00:00
programs.tmux = {
enable = true;
prefix = "`";
};
services.keybase.enable = true;
services.kbfs = {
enable = true;
mountPoint = "Keybase";
};
2021-03-28 15:21:33 +00:00
services.protonmail-bridge = { enable = true; };
2021-02-24 20:44:38 +00:00
programs.texlive = {
enable = true;
2020-11-21 15:51:37 +00:00
extraPackages = tpkgs: {
inherit (tpkgs) scheme-medium collection-latexextra biblatex;
2020-11-21 15:51:37 +00:00
};
};
}