1
0
localhost/home-manager.nix

109 lines
2.8 KiB
Nix
Raw Normal View History

2019-07-18 17:29:22 +00:00
{ config, pkgs, ... }:
let
2019-07-18 18:27:13 +00:00
unstable = import <unstable> {};
2019-07-18 17:29:22 +00:00
home-manager = builtins.fetchGit {
url = "https://github.com/rycee/home-manager.git";
rev = "7d68c46feb845c572ef335f824062f90fdebf655";
};
in {
imports = [ "${home-manager}/nixos" ];
2019-07-18 20:01:07 +00:00
home-manager.users.user = {
programs = {
git = {
enable = true;
userName = "Mikhail Klementev";
userEmail = "blame@dumpstack.io";
signing = {
signByDefault = true;
key = "0x1525585D1B43C62A";
};
2019-07-18 17:29:22 +00:00
};
2019-07-18 20:52:21 +00:00
zsh = {
enable = true;
oh-my-zsh = {
enable = true;
theme = "gentoo";
plugins = [ "git" "cp" "tmux-my" ];
custom = "$HOME/.oh-my-zsh-custom";
};
sessionVariables = {
LC_ALL = "en_US.utf8";
LIBVIRT_DEFAULT_URI = "qemu:///system";
GOPATH = "\${HOME}";
PATH = "\${PATH}:\${HOME}/bin";
GPG_TTY = "$(tty)";
SSH_AUTH_SOCK = "$(gpgconf --list-dirs agent-ssh-socket)";
ZSH_TMUX_AUTOSTART = "true";
ZSH_TMUX_AUTOCONNECT = "true";
};
shellAliases = {
mutt = "neomutt";
vim = "emacs -nw";
emacs = "emacs -nw";
clipimage = "xclip -selection clipboard -target image/png -out > out.png";
};
initExtra = ''
gpgconf --launch gpg-agent
which apt >/dev/null 2>&1 && plugins=("\$\{(@)plugins:#tmux-my\}")
'';
};
2019-07-21 15:34:06 +00:00
gpg.enable = true;
};
services = {
gpg-agent = {
enable = true;
extraConfig = ''
pinentry-program ${pkgs.pinentry}/bin/pinentry-curses
'';
};
2019-07-18 17:29:22 +00:00
};
2019-07-18 18:50:00 +00:00
2019-07-18 20:01:07 +00:00
home.file = {
".emacs.d/init.el".source = ./etc/emacs.el;
".xmonad/xmonad.hs".source = ./etc/xmonad.hs;
2019-07-18 20:52:21 +00:00
2019-07-21 15:34:18 +00:00
".mutt/mailcap".source = ./etc/mutt/mailcap;
".mutt/muttrc".source = ./etc/mutt/muttrc;
".mutt/signature".source = ./etc/mutt/signature;
2019-07-18 20:52:21 +00:00
".oh-my-zsh-custom/plugins/tmux-my/tmux-my.extra.conf".source = ./etc/tmux-my/tmux-my.extra.conf;
".oh-my-zsh-custom/plugins/tmux-my/tmux-my.only.conf".source = ./etc/tmux-my/tmux-my.only.conf;
".oh-my-zsh-custom/plugins/tmux-my/tmux-my.plugin.zsh".source = ./etc/tmux-my/tmux-my.plugin.zsh;
2019-07-18 20:01:07 +00:00
};
2019-07-18 21:24:55 +00:00
home.keyboard = {
layout = "us,ru";
options = [ "ctrl:nocaps" "grp:rctrl_toggle" ];
};
2019-07-20 10:33:02 +00:00
xsession = {
enable = true;
windowManager.command = "exec xmonad";
initExtra = ''
touchpad=$(xinput | grep -o 'TouchPad.*id=[0-9]*' | cut -d '=' -f 2)
trackpoint=$(xinput | grep -o 'TrackPoint.*id=[0-9]*' | cut -d '=' -f 2)
xsetroot -solid '#000000'
xinput --disable $touchpad
xinput --set-prop $trackpoint 'Device Accel Constant Deceleration' 0.20
xhost +local
2019-07-21 15:13:42 +00:00
kitty &
2019-07-20 10:33:02 +00:00
'';
};
2019-07-18 19:51:19 +00:00
};
2019-07-18 17:29:22 +00:00
}