1
0
Fork 0
nixos-config/home/default.nix

154 lines
3.6 KiB
Nix
Raw Normal View History

2020-05-27 13:20:08 +00:00
{ pkgs, config, lib, ... }:
let
inherit (config.m-0.private) me meWork;
2018-05-31 12:03:03 +00:00
in {
2019-07-31 21:56:52 +00:00
imports = [
./zsh
2019-12-15 12:52:03 +00:00
./taskwarrior.nix
2020-05-27 13:20:08 +00:00
./home-options.nix
2019-07-31 21:56:52 +00:00
../common
2020-05-05 23:40:57 +00:00
./unlock.nix
./mpclient.nix
2020-05-12 16:39:18 +00:00
./neovim
2019-07-31 21:56:52 +00:00
];
2020-05-22 13:45:07 +00:00
services.gpg-agent.enable = true;
2020-05-27 13:20:08 +00:00
nixpkgs.overlays = import ../overlays.nix { inherit lib; };
2018-05-31 10:34:48 +00:00
2019-07-31 21:56:52 +00:00
programs = {
home-manager.enable = true;
direnv = {
enable = true;
enableZshIntegration = true;
2019-02-19 11:14:58 +00:00
};
2019-07-31 21:56:52 +00:00
tmux = {
enable = true;
2020-05-20 07:44:39 +00:00
escapeTime = 1;
historyLimit = 50000;
terminal = "screen-256color";
2019-07-31 21:56:52 +00:00
extraConfig = ''
set -g set-titles on
set -g status off
'';
};
2020-05-22 01:32:14 +00:00
password-store = {
package = pkgs.pass-wayland.withExtensions
(exts: [ exts.pass-update pkgs.pass-clip ]);
enable = true;
2020-05-27 13:20:08 +00:00
settings.PASSWORD_STORE_DIR =
"${config.home.homeDirectory}/git/password-store";
2020-05-22 01:32:14 +00:00
};
2019-07-31 21:56:52 +00:00
git = {
aliases = { sync = "!git pull -r && git push"; };
enable = true;
ignores = [
".syncthing*.tmp"
"*.swp"
"*.autosave~"
"*.aux"
"*.bbl"
"*.fls"
"*.idx"
"*.ilg"
"*.ind"
"*.log"
"*.out"
"*.toc"
"*.bcf"
"*.blg"
"*.fdb*"
"*.thm"
"*.run.xml"
"*.slnc"
"*.glade~"
"__pycache__"
".hledger-web_client_session_key.aes"
".nix-gc-roots"
2018-04-02 15:52:16 +00:00
];
2019-07-31 21:56:52 +00:00
userEmail = me.mail;
userName = me.name;
};
htop = {
enable = true;
hideThreads = true;
hideUserlandThreads = true;
highlightBaseName = true;
shadowOtherUsers = true;
showProgramPath = false;
treeView = true;
};
ssh = {
controlMaster = "auto";
controlPersist = "120";
enable = true;
matchBlocks = let
matheGwProxy = "ssh -q gw nc -q0 %h %p";
agHost = "fb04217.mathematik.tu-darmstadt.de";
2020-04-26 13:26:41 +00:00
in {
git-auto = {
2019-08-02 13:50:32 +00:00
hostname = "hera.m-0.eu";
user = "git";
identityFile = "~/.ssh/id_auto_ed25519";
2020-04-26 13:26:41 +00:00
};
git = {
2019-08-02 13:50:32 +00:00
hostname = "hera.m-0.eu";
user = "git";
2020-04-26 13:26:41 +00:00
};
hera = {
2019-08-02 13:50:32 +00:00
hostname = "hera.m-0.eu";
user = me.user;
2020-04-26 13:26:41 +00:00
};
ag-forward = {
2019-08-02 13:50:32 +00:00
hostname = agHost;
proxyCommand = matheGwProxy;
user = meWork.user;
2020-04-26 13:26:41 +00:00
};
ag = {
2019-08-02 13:50:32 +00:00
hostname = agHost;
user = meWork.user;
2020-04-26 13:26:41 +00:00
};
gw = {
2019-08-02 13:50:32 +00:00
hostname = "gwres4.mathematik.tu-darmstadt.de";
user = meWork.user;
2020-04-26 13:26:41 +00:00
};
shells = {
2019-08-02 13:50:32 +00:00
hostname = "shells.darmstadt.ccc.de";
user = me.user;
2020-04-26 13:26:41 +00:00
};
vorstand = {
2019-08-02 13:50:32 +00:00
hostname = "vorstand.darmstadt.ccc.de";
user = me.user;
2020-04-26 13:26:41 +00:00
};
whisky = {
2019-08-02 13:50:32 +00:00
hostname = "whisky.w17.io";
user = "chaos";
2020-04-26 13:26:41 +00:00
};
kitchen = {
2019-08-02 13:50:32 +00:00
hostname = "kitchen.w17.io";
user = "chaos";
2020-04-26 13:26:41 +00:00
};
"door.w17.io" = { identityFile = "~/.ssh/door_rsa"; };
};
2019-07-31 21:56:52 +00:00
};
2018-04-02 15:52:16 +00:00
};
2019-07-31 21:56:52 +00:00
home = {
2020-05-27 13:20:08 +00:00
packages = builtins.attrValues pkgs.home-pkgs;
2019-07-31 21:56:52 +00:00
sessionVariables = {
PATH =
"$HOME/.cargo/bin:/etc/profiles/per-user/${config.home.username}/bin:$HOME/.nix-profile/bin:$PATH";
2019-09-14 12:00:41 +00:00
BROWSER = "${pkgs.firefox}/bin/firefox";
EMAIL = me.mail;
SUDO_ASKPASS = let
print-pw = pkgs.writeShellScriptBin "print-pw"
2019-11-25 01:09:57 +00:00
"pass show eu/m-0/${config.m-0.hostName}.m-0.eu/${config.home.username}";
2019-09-14 12:00:41 +00:00
in "${print-pw}/bin/print-pw";
2019-07-31 21:56:52 +00:00
};
2020-05-27 13:20:08 +00:00
file.".direnvrc".text = "source ${pkgs.sources.nix-direnv}/direnvrc";
2019-09-14 12:00:41 +00:00
};
2018-04-02 15:52:16 +00:00
2019-12-15 12:52:03 +00:00
systemd.user = { startServices = true; };
2019-09-14 12:00:41 +00:00
xdg.enable = true;
}