summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--makefu/2configs/home-manager/mail.nix18
-rw-r--r--makefu/2configs/home-manager/zsh.nix61
2 files changed, 20 insertions, 59 deletions
diff --git a/makefu/2configs/home-manager/mail.nix b/makefu/2configs/home-manager/mail.nix
index 467e0d7a0..ba29e86a4 100644
--- a/makefu/2configs/home-manager/mail.nix
+++ b/makefu/2configs/home-manager/mail.nix
@@ -1,6 +1,8 @@
{
home-manager.users.makefu = {
+ programs.mbsync.enable = true;
accounts.email.maildirBasePath = "/home/makefu/Mail";
+ accounts.email.certificatesFile = "/etc/ssl/certs/ca-certificates.crt";
accounts.email.accounts.syntaxfehler = {
address = "felix.richter@syntax-fehler.de";
userName = "Felix.Richter@syntax-fehler.de";
@@ -10,18 +12,34 @@
enable = true;
};
};
+ mbsync = {
+ enable = true;
+ create = "both";
+ remove = "both";
+ expunge = "both";
+ patterns = [ "*" "!INBOX.Sent*"];
+ };
smtp = {
host = "syntax-fehler.de";
tls = {
enable = true;
};
};
+ folders = {
+ sent = "Sent";
+ trash = "Trash";
+ inbox = "INBOX";
+ drafts = "Drafts";
+ };
msmtp.enable = true;
notmuch.enable = true;
offlineimap = {
enable = true;
postSyncHookCommand = "notmuch new";
extraConfig.remote = {
+ auth_mechanisms = "LOGIN";
+ tls_level = "tls_secure";
+ ssl_version = "tls1_2";
holdconnectionopen = true;
idlefolders = "['INBOX']";
};
diff --git a/makefu/2configs/home-manager/zsh.nix b/makefu/2configs/home-manager/zsh.nix
index d24969ef0..4cd9becc7 100644
--- a/makefu/2configs/home-manager/zsh.nix
+++ b/makefu/2configs/home-manager/zsh.nix
@@ -2,65 +2,8 @@
{
imports = [
{ #direnv
- home-manager.users.makefu.home.packages = [ pkgs.direnv ];
- home-manager.users.makefu.home.file.".direnvrc".text = ''
- use_nix() {
- local path="$(nix-instantiate --find-file nixpkgs)"
-
- if [ -f "$${path}/.version-suffix" ]; then
- local version="$(< $path/.version-suffix)"
- elif [ -f "$path/.version" ]; then
- local version="$(< $path/.version)"
- else
- local version="$(< $(< $path/.git/HEAD))"
- fi
-
- local cache=".direnv/cache-''${version:-unknown}"
-
- if [[ ! -e "$cache" ]] || \
- [[ "$HOME/.direnvrc" -nt "$cache" ]] || \
- [[ .envrc -nt "$cache" ]] || \
- [[ default.nix -nt "$cache" ]] || \
- [[ shell.nix -nt "$cache" ]];
- then
- [ -d .direnv ] || mkdir .direnv
- local tmp=$(nix-shell --show-trace "$@" \
- --run "\"$direnv\" dump zsh")
- echo "$tmp" > "$cache"
- fi
-
- local path_backup=$PATH term_backup=$TERM
- . "$cache"
-
- export PATH=$PATH:$path_backup TERM=$term_backup
-
- if [[ $# = 0 ]]; then
- watch_file default.nix
- watch_file shell.nix
- fi
- }
- '';
- home-manager.users.makefu.programs.zsh.initExtra = ''
- nixify() {
- if [ ! -e ./.envrc ]; then
- echo "use nix" > .envrc
- direnv allow
- fi
- if [ ! -e default.nix ]; then
- cat > default.nix <<'EOF'
- with import <nixpkgs> {};
- stdenv.mkDerivation {
- name = "env";
- buildInputs = [
- bashInteractive
- ];
- }
- EOF
- ''${EDITOR:-vim} default.nix
- fi
- }
- eval "$(direnv hook zsh)"
- '';
+ home-manager.users.makefu.home.packages = [ pkgs.direnv pkgs.nur.repos.kalbasit.nixify ];
+ # home-manager.users.makefu.home.file.".direnvrc".text = '''';
}
{ # bat
home-manager.users.makefu.home.packages = [ pkgs.bat ];