mail, contacts, pass, linux and mac mbsync and vdirsyncer services, adding Passwords for these services to pass and syncthing, upping gpg agent timeout to infinity..

master
Dustin Swan 6 days ago
parent bd36e83523
commit 72b6cc0d4b
Signed by: dustinswan
GPG Key ID: 30D46587E2100467

@ -245,6 +245,13 @@ in
programs.gpg.enable = true; programs.gpg.enable = true;
programs.password-store = {
enable = true;
settings = {
PASSWORD_STORE_DIR = "$HOME/.password-store";
};
};
programs.keychain = { programs.keychain = {
enable = true; enable = true;
keys = [ "id_rsa" "id_rsa_mr" "2B3A6377" ]; keys = [ "id_rsa" "id_rsa_mr" "2B3A6377" ];

@ -42,22 +42,22 @@
}; };
}; };
programs.zed-editor = { # programs.zed-editor = {
enable = true; # enable = true;
userSettings = { # userSettings = {
vim_mode = true; # vim_mode = true;
theme = { # theme = {
mode = "system"; # mode = "system";
light = "Catppuccin Latte"; # light = "Catppuccin Latte";
dark = "Catppuccin Frappé"; # dark = "Catppuccin Frappé";
}; # };
buffer_font_size = 16; # buffer_font_size = 16;
buffer_font_family = "Iosevka Nerd Font Mono"; # buffer_font_family = "Iosevka Nerd Font Mono";
vim = { # vim = {
enable_vim_sneak = true; # enable_vim_sneak = true;
use_smartcase_find = true; # use_smartcase_find = true;
}; # };
format_on_save = "off"; # format_on_save = "off";
}; # };
}; # };
} }

@ -81,6 +81,10 @@ in
path = "~/Sync"; path = "~/Sync";
devices = [ "Laptop" "Phone" ]; devices = [ "Laptop" "Phone" ];
}; };
"Passwords" = {
path = "~/.password-store";
devices = [ "Laptop" ]; # just Mac, not phone
};
}; };
}; };
}; };
@ -88,13 +92,23 @@ in
services.gpg-agent = { services.gpg-agent = {
enable = true; enable = true;
enableSshSupport = true; enableSshSupport = true;
defaultCacheTtl = 86400; defaultCacheTtl = 34560000;
maxCacheTtl = 86400; maxCacheTtl = 34560000;
defaultCacheTtlSsh = 86400; defaultCacheTtlSsh = 34560000;
maxCacheTtlSsh = 86400; maxCacheTtlSsh = 34560000;
pinentry.package = pkgs.pinentry-all; pinentry.package = pkgs.pinentry-all;
}; };
services.mbsync = {
enable = true;
frequency = "*:0/5"; # every 5 minutes
};
services.vdirsyncer = {
enable = true;
frequency = "*:0/15"; # every 15 minutes
};
# Niri config - imported from separate file # Niri config - imported from separate file
# xdg.configFile."niri/config.kdl".source = ./niri-config.kdl; # xdg.configFile."niri/config.kdl".source = ./niri-config.kdl;

@ -15,11 +15,31 @@
target = ".gnupg/gpg-agent.conf"; target = ".gnupg/gpg-agent.conf";
text = '' text = ''
pinentry-program ${pkgs.pinentry_mac}/Applications/pinentry-mac.app/Contents/MacOS/pinentry-mac pinentry-program ${pkgs.pinentry_mac}/Applications/pinentry-mac.app/Contents/MacOS/pinentry-mac
default-cache-ttl 86400 default-cache-ttl 34560000
max-cache-ttl 86400 max-cache-ttl 34560000
''; '';
}; };
launchd.agents.mbsync = {
enable = true;
config = {
ProgramArguments = [ "${pkgs.isync}/bin/mbsync" "-a" ];
StartInterval = 300; # every 5 minutes
StandardOutPath = "/tmp/mbsync.log";
StandardErrorPath = "/tmp/mbsync.err";
};
};
launchd.agents.vdirsyncer = {
enable = true;
config = {
ProgramArguments = [ "${pkgs.vdirsyncer}/bin/vdirsyncer" "sync" ];
StartInterval = 900; # every 15 minutes
StandardOutPath = "/tmp/vdirsyncer.log";
StandardErrorPath = "/tmp/vdirsyncer.err";
};
};
# https://codeberg.org/adamcstephens/dotfiles/src/commit/e14f35f6e9a9cb9174016948c512c0db364e0dec/apps/fish/init.fish # https://codeberg.org/adamcstephens/dotfiles/src/commit/e14f35f6e9a9cb9174016948c512c0db364e0dec/apps/fish/init.fish
programs.fish.shellInit = '' programs.fish.shellInit = ''
fenv source "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh" fenv source "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh"

@ -5,6 +5,7 @@
programs.msmtp.enable = true; programs.msmtp.enable = true;
programs.himalaya.enable = true; programs.himalaya.enable = true;
programs.vdirsyncer.enable = true; programs.vdirsyncer.enable = true;
programs.khard.enable = true;
programs.aerc = { programs.aerc = {
enable = true; enable = true;
extraConfig.general.unsafe-accounts-conf = true; extraConfig.general.unsafe-accounts-conf = true;
@ -32,7 +33,7 @@
signByDefault = true; signByDefault = true;
key = "AD11750151C10881970BD943AB49BD6B2B3A6377"; key = "AD11750151C10881970BD943AB49BD6B2B3A6377";
}; };
passwordCommand = "gpg -dq ${builtins.getEnv "HOME"}/.dustinswan@fastmail.com-password.gpg"; passwordCommand = "pass show email/fastmail";
mbsync = { mbsync = {
enable = true; enable = true;
create = "maildir"; create = "maildir";
@ -69,13 +70,33 @@
}; };
primary = true; primary = true;
remote = { remote = {
passwordCommand = ["~/dotfiles/bin/decrypt-password" "dustinswan@fastmail.com"]; passwordCommand = ["pass" "show" "email/fastmail"];
type = "caldav"; type = "caldav";
url = "https://caldav.fastmail.com/dav/"; url = "https://caldav.fastmail.com/dav/";
userName = "dustinswan@fastmail.com"; userName = "dustinswan@fastmail.com";
}; };
vdirsyncer = { vdirsyncer = {
enable = true; enable = true;
collections = ["from a" "from b"];
};
};
};
};
accounts.contact = {
basePath = "Contacts";
accounts = {
FastMail = {
khard.enable = true;
remote = {
passwordCommand = ["pass" "show" "email/fastmail"];
type = "carddav";
url = "https://carddav.fastmail.com/dav/";
userName = "dustinswan@fastmail.com";
};
vdirsyncer = {
enable = true;
collections = ["from a" "from b"];
}; };
}; };
}; };

Loading…
Cancel
Save