2022-02-26 10:18:01 +00:00
|
|
|
desktop: { pkgs, ... }: {
|
2022-01-15 15:54:18 +00:00
|
|
|
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-04-13 09:59:45 +00:00
|
|
|
../programs/ssh.nix
|
2022-01-15 15:54:18 +00:00
|
|
|
];
|
|
|
|
programs = {
|
|
|
|
zsh = {
|
2022-04-22 14:01:08 +00:00
|
|
|
enable = true;
|
2022-01-15 15:54:18 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
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-02-26 10:18:01 +00:00
|
|
|
${if desktop then ''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)"')"'' else ""}
|
2022-01-21 08:50:29 +00:00
|
|
|
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-04-22 14:01:08 +00:00
|
|
|
sessionVariables = {
|
|
|
|
SDL_VIDEODRIVER = "wayland";
|
|
|
|
QT_QPA_PLATFORM = "wayland";
|
|
|
|
QT_WAYLAND_DISABLE_WINDOWDECORATION = 1;
|
|
|
|
_JAVA_AWT_WM_NONREPARENTING = 1;
|
|
|
|
MOZ_ENABLE_WAYLAND = 1;
|
|
|
|
GTK_IM_MODULE = "ibus";
|
|
|
|
QT_IM_MODULE = "ibus";
|
|
|
|
XMODIFIERS = "@im=ibus";
|
|
|
|
};
|
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
|
|
|
|
2022-04-06 08:11:56 +00:00
|
|
|
accounts.email.maildirBasePath = "Maildir";
|
2022-01-19 13:47:14 +00:00
|
|
|
accounts.email.accounts = rec {
|
2022-03-06 15:15:26 +00:00
|
|
|
lotte = {
|
|
|
|
aliases = [ "darkkirb@darkkirb.de" "postmaster@darkkirb.de" "postmaster@chir.rs" "postmaster@miifox.net" ];
|
2022-01-19 13:47:14 +00:00
|
|
|
gpg = {
|
|
|
|
encryptByDefault = true;
|
2022-02-02 16:47:02 +00:00
|
|
|
key = "B4E3D4801C49EC5E";
|
2022-01-19 13:47:14 +00:00
|
|
|
signByDefault = true;
|
|
|
|
};
|
2022-03-06 15:15:26 +00:00
|
|
|
imap.host = "mail.chir.rs";
|
2022-01-19 13:47:14 +00:00
|
|
|
imapnotify = {
|
|
|
|
enable = true;
|
|
|
|
boxes = [ "Inbox" ];
|
2022-03-06 09:00:59 +00:00
|
|
|
onNotify = "${pkgs.isync}/bin/mbsync -a || true";
|
2022-02-26 10:18:01 +00:00
|
|
|
onNotifyPost = if desktop then "${pkgs.notmuch}/bin/notmuch new && ${pkgs.libnotify}/bin/notify-send 'New mail arrived'" else "${pkgs.notmuch}/bin/notmuch new";
|
2022-01-19 13:47:14 +00:00
|
|
|
};
|
2022-03-06 15:15:26 +00:00
|
|
|
smtp.host = "mail.chir.rs";
|
|
|
|
address = "lotte@chir.rs";
|
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;
|
|
|
|
realName = "Charlotte 🦝 Delenk";
|
|
|
|
passwordCommand = "${pkgs.coreutils}/bin/cat /run/secrets/email/lotte@chir.rs";
|
|
|
|
primary = true;
|
|
|
|
signature.text = ''
|
|
|
|
Charlotte
|
|
|
|
|
2022-02-09 10:01:10 +00:00
|
|
|
https://darkkirb.de • GPG Key EF5F 367A 95E0 BFA6 • https://keybase.io/darkkirb
|
2022-01-19 13:47:14 +00:00
|
|
|
'';
|
2022-01-19 13:56:46 +00:00
|
|
|
signature.showSignature = "append";
|
2022-01-19 13:47:14 +00:00
|
|
|
userName = "lotte@chir.rs";
|
|
|
|
};
|
2022-03-06 15:15:26 +00:00
|
|
|
mdelenk = lotte // {
|
2022-01-19 13:48:22 +00:00
|
|
|
address = "mdelenk@hs-mittweida.de";
|
2022-01-19 13:47:14 +00:00
|
|
|
aliases = [ ];
|
2022-03-06 15:15:26 +00:00
|
|
|
gpg = lotte.gpg // {
|
2022-01-19 13:47:14 +00:00
|
|
|
key = "5130416C797067B6";
|
|
|
|
};
|
|
|
|
imap.host = "xc.hs-mittweida.de";
|
2022-03-06 15:15:26 +00:00
|
|
|
mbsync = lotte.mbsync // {
|
2022-01-19 14:57:35 +00:00
|
|
|
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-03-06 15:15:26 +00:00
|
|
|
primary = false;
|
2022-01-19 13:47:14 +00:00
|
|
|
};
|
|
|
|
};
|
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-02-02 09:55:56 +00:00
|
|
|
yubikey-manager
|
2022-02-02 13:53:19 +00:00
|
|
|
yubico-piv-tool
|
2022-01-24 06:55:46 +00:00
|
|
|
];
|
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-04-06 19:05:19 +00:00
|
|
|
home.stateVersion = "22.05";
|
2022-01-15 15:54:18 +00:00
|
|
|
}
|