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

203 lines
4.7 KiB
Nix
Raw Normal View History

2018-05-26 20:48:33 +00:00
{ pkgs, config, ... }:
let
inherit (config.m-0.private) me meWork;
2019-08-02 03:17:00 +00:00
my-pkgs = import ../pkgs;
inherit (my-pkgs) lorri;
2018-05-31 12:03:03 +00:00
in {
2019-07-31 21:56:52 +00:00
imports = [
./zsh
./update-script.nix
./modules/taskwarrior.nix
./modules/force-copies.nix
./modules/accounting
./modules/rustdev.nix
./modules/latex.nix
./modules/mail.nix
./modules/home-options.nix
./modules/unlock.nix
./modules/weechat
./modules/bugwarrior.nix
./modules/pythia.nix
../common
];
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;
extraConfig = ''
set default-terminal "screen-256color"
set -g set-titles on
set -g status off
set -g escape-time 1
'';
};
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";
2019-08-02 13:50:32 +00:00
in [
{
host = "git-auto";
hostname = "hera.m-0.eu";
user = "git";
identityFile = "~/.ssh/id_auto_ed25519";
}
{
host = "git";
hostname = "hera.m-0.eu";
user = "git";
}
{
host = "hera";
hostname = "hera.m-0.eu";
user = me.user;
}
{
host = "ag-forward";
hostname = agHost;
proxyCommand = matheGwProxy;
user = meWork.user;
}
{
host = "ag";
hostname = agHost;
user = meWork.user;
}
{
host = "gw";
hostname = "gwres4.mathematik.tu-darmstadt.de";
user = meWork.user;
}
{
host = "shells";
hostname = "shells.darmstadt.ccc.de";
user = me.user;
}
{
host = "vorstand";
hostname = "vorstand.darmstadt.ccc.de";
user = me.user;
}
{
host = "whisky";
hostname = "whisky.w17.io";
user = "chaos";
}
{
host = "kitchen";
hostname = "kitchen.w17.io";
user = "chaos";
}
{
host = "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 = {
2019-08-02 03:17:00 +00:00
packages = builtins.attrValues my-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";
EDITOR = "${pkgs.neovim}/bin/nvim";
TERMINAL = config.m-0.terminal;
EMAIL = me.mail;
SUDO_ASKPASS = let
print-pw = pkgs.writeShellScriptBin "print-pw"
2019-07-31 21:56:52 +00:00
"pass show eu/m-0/${config.m-0.hostName}/user/${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
};
2019-09-14 12:00:41 +00:00
file.".config/nvim/coc-settings.json".text = builtins.toJSON {
2019-09-15 19:07:57 +00:00
"diagnostic.maxWindowHeight" = 60;
2019-09-14 12:00:41 +00:00
languageserver = {
haskell = {
command = "ghcide";
args = [ "--lsp" ];
rootPatterns = [
".stack.yaml"
".hie-bios"
"BUILD.bazel"
"cabal.config"
"package.yaml"
];
filetypes = [ "hs" "lhs" "haskell" ];
2019-08-02 13:50:32 +00:00
};
};
2019-09-14 12:00:41 +00:00
};
};
2018-04-02 15:52:16 +00:00
2019-09-14 12:00:41 +00:00
systemd.user = {
startServices = true;
services.lorri-daemon = {
Unit = { Description = "Run lorri daemon"; };
Service = {
Environment =
2019-10-30 16:06:37 +00:00
"RUST_BACKTRACE=1 PATH=${pkgs.nix}/bin:${pkgs.coreutils}/bin:${pkgs.gnutar}/bin:${pkgs.gzip}/bin";
2019-09-14 12:00:41 +00:00
ExecStart = "${lorri}/bin/lorri daemon";
2019-08-02 13:50:32 +00:00
};
2019-09-17 21:45:26 +00:00
Install = { WantedBy = [ "graphical-session.target" ]; };
2019-09-14 12:00:41 +00:00
};
};
services = {
gpg-agent = {
enable = true;
defaultCacheTtl = 31536000; # 1year
maxCacheTtl = 31536000; # 1year
};
};
2019-07-31 20:36:41 +00:00
2019-09-14 12:00:41 +00:00
xdg.enable = true;
}