2022-01-15 15:54:18 +00:00
|
|
|
{ pkgs, ... }: {
|
|
|
|
imports = [
|
|
|
|
../programs/zsh.nix
|
2022-01-18 20:55:40 +00:00
|
|
|
../programs/vim.nix
|
2022-01-19 13:56:46 +00:00
|
|
|
../programs/mail.nix
|
2022-01-21 08:22:11 +00:00
|
|
|
../programs/tmux.nix
|
2022-01-15 15:54:18 +00:00
|
|
|
];
|
|
|
|
programs = {
|
|
|
|
zsh = {
|
|
|
|
oh-my-zsh = {
|
|
|
|
enable = true;
|
|
|
|
};
|
|
|
|
initExtraBeforeCompInit = "source ${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/powerlevel10k.zsh-theme";
|
2022-01-21 08:32:36 +00:00
|
|
|
initExtra = ''
|
|
|
|
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
|
|
|
|
2022-01-24 08:25:02 +00:00
|
|
|
export TERM=xterm-256color # for mosh
|
|
|
|
|
2022-01-21 08:32:36 +00:00
|
|
|
if [[ ! $TMUX ]]; then
|
2022-01-21 08:50:29 +00:00
|
|
|
# figure out the session to use
|
|
|
|
SESSION_NAME="$USER"
|
|
|
|
if [[ $SSH_CLIENT ]]; then
|
2022-01-21 15:40:26 +00:00
|
|
|
SESSION_NAME="$SESSION_NAME-$(echo $SSH_CLIENT | ${pkgs.gawk}/bin/awk '{print $1}' | sed 's/[\.\:]/_/g')"
|
2022-01-21 08:50:29 +00:00
|
|
|
elif [[ $WAYLAND_DISPLAY ]]; then
|
|
|
|
SESSION_NAME="$SESSION_NAME-$(${pkgs.sway}/bin/swaymsg -t get_tree | ${pkgs.jq}/bin/jq -r '.. | select(.focused?) | .rect | "\(.width)x\(.height)"')"
|
|
|
|
fi
|
2022-01-21 08:51:32 +00:00
|
|
|
${pkgs.tmux}/bin/tmux attach-session -t "$SESSION_NAME" || ${pkgs.tmux}/bin/tmux new-session -s "$SESSION_NAME"
|
2022-01-21 08:32:36 +00:00
|
|
|
fi
|
|
|
|
'';
|
2022-01-31 18:23:36 +00:00
|
|
|
plugins = [
|
|
|
|
{
|
|
|
|
name = "zsh-nix-shell";
|
|
|
|
file = "nix-shell.plugin.zsh";
|
|
|
|
src = pkgs.fetchFromGitHub {
|
|
|
|
owner = "chisui";
|
|
|
|
repo = "zsh-nix-shell";
|
|
|
|
rev = "v0.4.0";
|
|
|
|
sha256 = "037wz9fqmx0ngcwl9az55fgkipb745rymznxnssr3rx9irb6apzg";
|
|
|
|
};
|
|
|
|
}
|
|
|
|
];
|
2022-01-15 15:54:18 +00:00
|
|
|
};
|
|
|
|
};
|
2022-01-15 16:03:02 +00:00
|
|
|
home.file.".p10k.zsh".source = ./.p10k.zsh;
|
2022-01-19 13:47:14 +00:00
|
|
|
|
|
|
|
accounts.email.accounts = rec {
|
|
|
|
darkkirb = {
|
2022-01-19 13:48:22 +00:00
|
|
|
address = "darkkirb@darkkirb.de";
|
2022-01-19 13:47:14 +00:00
|
|
|
aliases = [ "postmaster@darkkirb.de" ];
|
|
|
|
gpg = {
|
|
|
|
encryptByDefault = true;
|
|
|
|
key = "3CEF5DDA915AECB0";
|
|
|
|
signByDefault = true;
|
|
|
|
};
|
|
|
|
imap.host = "mail.darkkirb.de";
|
|
|
|
imapnotify = {
|
|
|
|
enable = true;
|
|
|
|
boxes = [ "Inbox" ];
|
2022-01-19 19:18:54 +00:00
|
|
|
onNotify = "${pkgs.isync}/bin/mbsync -a";
|
2022-01-19 14:06:22 +00:00
|
|
|
onNotifyPost = "${pkgs.notmuch}/bin/notmuch new && ${pkgs.libnotify}/bin/notify-send 'New mail arrived'";
|
2022-01-19 13:47:14 +00:00
|
|
|
};
|
|
|
|
mbsync = {
|
|
|
|
enable = true;
|
|
|
|
create = "both";
|
|
|
|
expunge = "both";
|
|
|
|
remove = "both";
|
|
|
|
};
|
|
|
|
msmtp.enable = true;
|
|
|
|
neomutt.enable = true;
|
|
|
|
notmuch.enable = true;
|
|
|
|
passwordCommand = "${pkgs.coreutils}/bin/cat /run/secrets/email/darkkirb@darkkirb.de";
|
|
|
|
realName = "Charlotte 🦝 Delenk";
|
|
|
|
signature.text = ''
|
|
|
|
Charlotte
|
|
|
|
|
|
|
|
https://darkkirb.de • GPG Key 3CEF 5DDA 915A ECB0 • https://keybase.io/darkkirb
|
|
|
|
|
|
|
|
This message was sent from an old email address. My new email address is lotte@chir.rs.
|
|
|
|
Please update your contacts accordingly
|
|
|
|
'';
|
2022-01-19 13:56:46 +00:00
|
|
|
signature.showSignature = "append";
|
2022-01-19 13:47:14 +00:00
|
|
|
smtp.host = "mail.darkkirb.de";
|
|
|
|
userName = "darkkirb@darkkirb.de";
|
|
|
|
};
|
|
|
|
lotte = darkkirb // {
|
2022-01-19 13:48:22 +00:00
|
|
|
address = "lotte@chir.rs";
|
2022-01-19 13:47:14 +00:00
|
|
|
aliases = [ "postmaster@chir.rs" ];
|
|
|
|
passwordCommand = "${pkgs.coreutils}/bin/cat /run/secrets/email/lotte@chir.rs";
|
|
|
|
primary = true;
|
|
|
|
signature.text = ''
|
|
|
|
Charlotte
|
|
|
|
|
|
|
|
https://darkkirb.de • GPG Key 3CEF 5DDA 915A ECB0 • https://keybase.io/darkkirb
|
|
|
|
'';
|
2022-01-19 13:56:46 +00:00
|
|
|
signature.showSignature = "append";
|
2022-01-19 13:47:14 +00:00
|
|
|
userName = "lotte@chir.rs";
|
|
|
|
};
|
|
|
|
mdelenk = darkkirb // {
|
2022-01-19 13:48:22 +00:00
|
|
|
address = "mdelenk@hs-mittweida.de";
|
2022-01-19 13:47:14 +00:00
|
|
|
aliases = [ ];
|
|
|
|
gpg = darkkirb.gpg // {
|
|
|
|
key = "5130416C797067B6";
|
|
|
|
};
|
|
|
|
imap.host = "xc.hs-mittweida.de";
|
2022-01-19 14:57:35 +00:00
|
|
|
mbsync = darkkirb.mbsync // {
|
|
|
|
extraConfig.account = {
|
|
|
|
AuthMechs = "LOGIN";
|
|
|
|
};
|
|
|
|
};
|
2022-01-19 13:47:14 +00:00
|
|
|
passwordCommand = "${pkgs.coreutils}/bin/cat /run/secrets/email/mdelenk@hs-mittweida.de";
|
|
|
|
realName = "Morten Delenk";
|
|
|
|
signature.text = ''
|
|
|
|
Morten
|
|
|
|
'';
|
2022-01-19 13:56:46 +00:00
|
|
|
signature.showSignature = "append";
|
2022-01-19 13:47:14 +00:00
|
|
|
smtp = {
|
|
|
|
host = "xc.hs-mittweida.de";
|
|
|
|
port = 587;
|
|
|
|
tls.useStartTls = true;
|
|
|
|
};
|
|
|
|
userName = "mdelenk@hs-mittweida.de";
|
|
|
|
};
|
|
|
|
};
|
2022-01-19 13:56:46 +00:00
|
|
|
home = {
|
|
|
|
sessionVariables = {
|
|
|
|
EDITOR = "nvim";
|
|
|
|
};
|
|
|
|
shellAliases = {
|
|
|
|
vim = "nvim";
|
2022-01-21 07:41:19 +00:00
|
|
|
cat = "bat";
|
|
|
|
less = "bat";
|
2022-01-19 13:56:46 +00:00
|
|
|
};
|
2022-01-24 06:55:46 +00:00
|
|
|
packages = with pkgs; [
|
|
|
|
mosh
|
|
|
|
];
|
2022-01-19 13:56:46 +00:00
|
|
|
};
|
2022-01-21 07:41:19 +00:00
|
|
|
|
|
|
|
programs.exa = {
|
|
|
|
enable = true;
|
|
|
|
enableAliases = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
programs.bat = {
|
|
|
|
enable = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
programs.fzf = {
|
|
|
|
enable = true;
|
|
|
|
tmux.enableShellIntegration = true;
|
|
|
|
};
|
2022-01-15 15:54:18 +00:00
|
|
|
}
|