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PW62DFNWV3WZWQUUPA7CZH6STDZFYU7ARERQC
7UWOMG432IHX7BGGN7PPQUGSSUP6CCQNBXOO7TKNMKMK2R2WFOGAC
WWLIQ2NGWGL6JAQ2GS5K2SJEGKXR5I4L5HLSSJCDWLDLSA4FIO2AC
TIAN54QWQA6YCIYL6C7YXXELA3SKBSMP2Y3ET2YLRWHHOPDE3Y3AC
UGB75SJDEEIESGIBHGNFNLBXDRVG5RTSQGXCPX6YALFUOGDKWZHQC
BPBU3VMEUPTXFVYKEPATHO6O5ZUN3I4MW6MRWHPIUXSWJ73WTX5AC
UIUV6ER2W7XTLBOLPPZWVW4UOZ4KQWKFOYAEBUGSSCZ7BMSZRP3AC
FXR6YZV6PHT4EQ5TEJP5UPDYPWEDGJ5BVULM2C5KQWZD4IBER46AC
TXU55BEHKBJLAFQATXNK36M3CM2KNH3YCQCVF54NK7O2CO4LHM4QC
MLRHVC6KVWGVDIQMAUMNAGWYBB6AQAJCEJY7MKDGN72JRC74VT6AC
VRVC5LOKAOVX4N4BHXKUWVZF54LTFGBGXP5RHLXBOZVDFTCIOXJAC
ISTJKNJXBXQUSRXCILUOFWNDHC4N7VM2BJ4IGFGYCBBFXGDEVSQQC
IZ6I7IFHKZLD4EUJHSRGGRMVNKMOBNHCV7HPQUK2CUGP5M7EGEFAC
BJKOD7ZFG2DJGJ6E4WZJD6ITNMRNNCALRVTNX26LMDSRK6VLNJGAC
{
}
config,
pkgs,
...
}: let
gui =
if config.wayland.windowManager.sway.enable
then [pkgs.megasync]
else [];
in {
config.home.packages = with pkgs; [megacmd] ++ gui;
config.systemd.user.services.mega-cmd-server-init = {
Unit.Description = "Try to start mega-cmd when sway starts.";
Install.WantedBy = ["graphical-session.target"];
Service.Type = "oneshot";
Service.ExecStart = "${pkgs.megacmd}/bin/mega-cmd-server";
};
@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);
#tabbrowser-tabs {
visibility: collapse !important;
}
/* makes the treestyle tab view look cleaner */
#sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"] #sidebar-header {
display: none;
}
/* hides firefox's default tab bar */
dotfiles.shell.enable = true;
# xdg.systemDirs.data = [
# "/usr/share"
# "/var/lib/flatpak/exports/share"
# "${homeDirectory}/.local/share/flatpak/exports/share"
# ];
dotfiles.shell.python.enable = true;
dotfiles.gui.enable = true;
dotfiles.gui.sway.enable = false;
imports = [
../../firefox
../../guiapps
../../linux_desktop
../../meganz.nix
../../sway
../../terminal_emulator
];
imports = [
../../../hm_modules
input-modules.doom
];
dotfiles.shell.enable = true;
dotfiles.shell.python.enable = true;
imports = [../../../hm_modules];
{
config,
pkgs,
lib,
dotfiles_lib,
...
}: let
cfg = config.programs.meganz;
in
with lib; {
options.programs.meganz = with dotfiles_lib.options; {
enable = mkEnableOption "Install meganz and optionally the configured gui app + systemd sync service.";
sync.enable = mkDefaultEnabledOption "Enable a systemd service to start mega's sync in the background to initiate syncing any configured sync folders.";
gui.enable = mkEnableOption "Install the gui mega app called MegaSync.";
};
config = mkIf cfg.enable {
home.packages =
[pkgs.megacmd]
++ (
if programs.meganz.gui.enable
then [pkgs.megasync]
else []
);
systemd.user.services.mega-cmd-server-init = {
Unit.Description = "Try to start mega-cmd when sway starts.";
Install.WantedBy = ["graphical-session.target"];
Service.Type = "oneshot";
Service.ExecStart = "${pkgs.megacmd}/bin/mega-cmd-server";
};
};
}
inherit (pkgs.stdenv.hostPlatform) isLinux;
zoom-us = pkgs.zoom-us.overrideAttrs (old: {
postFixup =
old.postFixup
+ ''
wrapProgram $out/bin/zoom-us --unset XDG_SESSION_TYPE --set XDG_CURRENT_DESKTOP "GNOME"
wrapProgram $out/bin/zoom --unset XDG_SESSION_TYPE --set XDG_CURRENT_DESKTOP "GNOME"
'';
});
in {
xdg.configFile."zoomus.conf".text = ''
[General]
GeoLocale=system
SensitiveInfoMaskOn=true
autoPlayGif=false
autoScale=true
bForceMaximizeWM=false
blockUntrustedSSLCert=false
captureHDCamera=true
chatListPanelLastWidth=230
conf.webserver=https://us06web.zoom.us
conf.webserver.vendor.default=https://zoom.us
enable.host.auto.grab=true
enableAlphaBuffer=true
enableCloudSwitch=false
enableLog=true
enableMiniWindow=true
enableQmlCache=true
enableScreenSaveGuard=false
enableStartMeetingWithRoomSystem=false
enableTestMode=false
enableWaylandShare=True
enablegpucomputeutilization=false
fake.version=
flashChatTime=0
forceEnableTrayIcon=true
forceSSOURL=
host.auto.grab.interval=10
isTransCoding=false
logLevel=info
newMeetingWithVideo=true
playSoundForNewMessage=false
scaleFactor=1
shareBarTopMargin=0
sso_domain=.zoom.us
sso_gov_domain=.zoomgov.com
system.audio.type=default
timeFormat12HoursEnable=true
upcoming_meeting_header_image=
useSystemTheme=false
cfg = config.programs.zoom;
in
with lib; {
options.programs.zoom = {
enable = mkEnableOption "Enable zoom patched to work on wayland + sway";
};
[AS]
showframewindow=true
config = mkIf cfg.enable {
home.packages = [
(pkgs.zoom-us.overrideAttrs (old: {
postFixup =
old.postFixup
+ ''
wrapProgram $out/bin/zoom-us --unset XDG_SESSION_TYPE --set XDG_CURRENT_DESKTOP "GNOME"
wrapProgram $out/bin/zoom --unset XDG_SESSION_TYPE --set XDG_CURRENT_DESKTOP "GNOME"
'';
}))
];
[chat.recent]
recentlast.session=
xdg.configFile."zoomus.conf".text = ''
[General]
GeoLocale=system
SensitiveInfoMaskOn=true
autoPlayGif=false
autoScale=true
bForceMaximizeWM=false
blockUntrustedSSLCert=false
captureHDCamera=true
chatListPanelLastWidth=230
conf.webserver=https://us06web.zoom.us
conf.webserver.vendor.default=https://zoom.us
enable.host.auto.grab=true
enableAlphaBuffer=true
enableCloudSwitch=false
enableLog=true
enableMiniWindow=true
enableQmlCache=true
enableScreenSaveGuard=false
enableStartMeetingWithRoomSystem=false
enableTestMode=false
enableWaylandShare=True
enablegpucomputeutilization=false
fake.version=
flashChatTime=0
forceEnableTrayIcon=true
forceSSOURL=
host.auto.grab.interval=10
isTransCoding=false
logLevel=info
newMeetingWithVideo=true
playSoundForNewMessage=false
scaleFactor=1
shareBarTopMargin=0
sso_domain=.zoom.us
sso_gov_domain=.zoomgov.com
system.audio.type=default
timeFormat12HoursEnable=true
upcoming_meeting_header_image=
useSystemTheme=false
home.packages =
if isLinux
then
with pkgs; [
darktable
keepassxc
git-credential-keepassxc
signal-desktop
write_stylus
zoom-us
]
else [];
}
[zoom_new_im]
is_landscape_mode=true
main_frame_pixel_pos_narrow="376,680"
main_frame_pixel_pos_wide="1908,2120"
'';
};
}
colors:
primary:
background: "0x232136"
foreground: "0xe0def4"
cursor:
text: "0xe0def4"
cursor: "0x56526e"
vi_mode_cursor:
text: "0xe0def4"
cursor: "0x56526e"
line_indicator:
foreground: None
background: None
selection:
text: "0xe0def4"
background: "0x44415a"
normal:
black: "0x393552"
red: "0xeb6f92"
green: "0x3e8fb0"
yellow: "0xf6c177"
blue: "0x9ccfd8"
magenta: "0xc4a7e7"
cyan: "0xea9a97"
white: "0xe0def4"
bright:
black: "0x6e6a86"
red: "0xeb6f92"
green: "0x3e8fb0"
yellow: "0xf6c177"
blue: "0x9ccfd8"
magenta: "0xc4a7e7"
cyan: "0xea9a97"
white: "0xe0def4"
hints:
start:
foreground: "#908caa"
background: "#2a273f"
end:
foreground: "#6e6a86"
background: "#2a273f"
config.systemd.user.services.swayidle = {
Unit = {
Description = "Sway Idle Manager";
Documentation = "man:swayidle(1)";
PartOf = ["graphical-session.target"];
};
config = lib.mkIf config.dotfiles.gui.sway.idle.enable {
systemd.user.services.swayidle = {
Unit = {
Description = "Sway Idle Manager";
Documentation = "man:swayidle(1)";
PartOf = ["graphical-session.target"];
};
Service = {
ExecStart = ''
${pkgs.swayidle}/bin/swayidle -w \
timeout 240 '${displayOff}' \
resume '${displayOn}' \
timeout 180 '${displayLock}' \
resume 'swaymsg "${displayOn}"' \
timeout 1200 'systemctl suspend'\
resume 'swaymsg "${displayOn}"' \
before-sleep '${displayLock}'
'';
Service = {
ExecStart = ''
${pkgs.swayidle}/bin/swayidle -w \
timeout 240 '${displayOff}' \
resume '${displayOn}' \
timeout 180 '${displayLock}' \
resume 'swaymsg "${displayOn}"' \
timeout 1200 'systemctl suspend'\
resume 'swaymsg "${displayOn}"' \
before-sleep '${displayLock}'
'';
};
{
config,
pkgs,
...
}: let
wallpapers = "${config.home.homeDirectory}/dotfiles/hm_modules/gui/sway/wallpapers";
in {
wayland.windowManager.sway = {
config.fonts.names = ["DejaVu Sans Mono" "FontAwesome5Free"]; # TODO don't hardcode
config.bars = [{command = "waybar";}];
config.floating.criteria = [
{app_id = "pavucontrol";}
{app_id = "zenity";}
{class = ".zoom";}
];
config.floating.titlebar = false;
config.focus.mouseWarping = true;
config.gaps.inner = 3;
config.gaps.outer = 3;
config.gaps.smartGaps = true;
config.input."*".natural_scroll = "enabled";
config.input."type:touchpad".tap = "enabled";
config.output."*".bg = "${wallpapers}/1.jpg fill";
config.startup = [
{
command = "${pkgs.kanshi}/bin/kanshi";
always = true;
}
];
config.window.titlebar = false;
config.workspaceAutoBackAndForth = true;
wrapperFeatures.base = true;
wrapperFeatures.gtk = true;
extraConfig = ''
seat seat0 xcursor_theme breeze 62
for_window [app_id="scratch_terminal"] move scratchpad, resize set 800 610
exec ${pkgs.alacritty}/bin/alacritty --title=scratch_terminal
'';
};
}
config.xdg.configFile."swappy/config".text = ''
[Default]
save_dir=$HOME/screenshots
save_filename_format=%Y%m%d-%H%M%S-screenshot.png
show_panel=false
line_size=5
text_size=20
text_font=sans-serif
'';
config.home.packages = with pkgs; [
grim
slurp
swappy
];
config = lib.mkIf config.wayland.windowManager.sway.enable {
xdg.configFile."swappy/config".text = ''
[Default]
save_dir=$HOME/screenshots
save_filename_format=%Y%m%d-%H%M%S-screenshot.png
show_panel=false
line_size=5
text_size=20
text_font=sans-serif
'';
home.packages = with pkgs; [
grim
slurp
swappy
];
};
config.home.packages = [
nwg-drawer
nwg-bar
];
config.home.packages =
if config.wayland.windowManager.sway.enable
then [
nwg-drawer
nwg-bar
]
else [];
wallpapers = "${config.home.homeDirectory}/dotfiles/nixpkgs/sway/wallpapers";
in {
imports = [
./kanshi.nix
./keybindings.nix
./screenshots.nix
./waybar.nix
./swayidle.nix
];
config.wayland.windowManager.sway = {
enable = true;
config.fonts.names = ["DejaVu Sans Mono" "FontAwesome5Free"];
config.bars = [{command = "waybar";}];
config.floating.criteria = [
{app_id = "pavucontrol";}
{app_id = "zenity";}
{class = ".zoom";}
dotfiles_cfg = config.dotfiles;
cfg = dotfiles_cfg.gui.sway;
in
with lib; {
imports = [
./kanshi.nix
./keybindings.nix
./screenshots.nix
./waybar.nix
./swayidle.nix
./sway.nix
config.floating.titlebar = false;
config.focus.mouseWarping = true;
config.gaps.inner = 3;
config.gaps.outer = 3;
config.gaps.smartGaps = true;
config.input."*".natural_scroll = "enabled";
config.input."type:touchpad".tap = "enabled";
config.output."*".bg = "${wallpapers}/1.jpg fill";
config.startup = [
{
command = "${pkgs.kanshi}/bin/kanshi";
always = true;
}
];
config.window.titlebar = false;
config.workspaceAutoBackAndForth = true;
wrapperFeatures.base = true;
wrapperFeatures.gtk = true;
extraSessionCommands = ''
export MOZ_ENABLE_WAYLAND=1
export MOZ_DBUS_REMOTE=1
'';
extraConfig = ''
seat seat0 xcursor_theme breeze 62
for_window [app_id="scratch_terminal"] move scratchpad, resize set 800 610
exec ${pkgs.alacritty}/bin/alacritty --title=scratch_terminal
'';
};
options.dotfiles.gui.sway = {
enable = mkEnableOption "Use highly configured sway as the window manager.";
idle.enable = mkEnableOption "Use my configured swayidle or not.";
};
config = mkIf cfg.enable {
wayland.windowManager.sway = {
enable = mkDefault cfg.enable;
config.terminal = dotfiles_cfg.gui.terminal;
};
programs.waybar.enable = mkDefault cfg.enable;
services.kanshi.enable = mkDefault cfg.enable;
# notifications daemon
config.services.mako = {
enable = true;
anchor = "top-center";
defaultTimeout = 2750;
};
# notifications daemon
services.mako = {
enable = mkDefault true;
anchor = "top-center";
defaultTimeout = 2750;
};
config.services.blueman-applet.enable = true;
config.services.gammastep = {
enable = true;
latitude = "36.174465";
longitude = "-86.767960";
};
services.blueman-applet.enable = mkDefault true;
services.gammastep = {
enable = mkDefault true;
latitude = "36.174465";
longitude = "-86.767960";
};
config.home.packages = with pkgs; [
wldash
imv
libnotify
mpv
pavucontrol
playerctl
pulseaudio
ranger
source-code-pro
swaylock-effects
wl-clipboard
];
home.packages = with pkgs; [
wldash
imv
libnotify
mpv
pavucontrol
playerctl
pulseaudio
ranger
swaylock-effects
wl-clipboard
];
config.xdg.configFile."nwg-panel/drawer.css".source = ./nwg-panel.css;
config.xdg.configFile."nwg-bar/style.css".source = ./nwg-bar.css;
config.xdg.configFile."nwg-bar/icons".source = ./icons;
config.xdg.configFile."nwg-bar/bar.json".text = ''
[
{
"label": "Lock screen",
"exec": "${pkgs.swaylock-effects}/bin/swaylock -f -c 000000",
"icon": "${config.xdg.configHome}/nwg-bar/icons/system-lock-screen.svg"
},
{
"label": "Sleep",
"exec": "systemctl hybrid-sleep",
"icon": "${config.xdg.configHome}/nwg-bar/icons/system-shutdown.svg"
},
{
"label": "Logout",
"exec": "swaymsg exit",
"icon": "${config.xdg.configHome}/nwg-bar/icons/system-log-out.svg"
},
{
"label": "Reboot",
"exec": "systemctl reboot",
"icon": "${config.xdg.configHome}/nwg-bar/icons/system-reboot.svg"
},
{
"label": "Shutdown",
"exec": "systemctl -i poweroff",
"icon": "${config.xdg.configHome}/nwg-bar/icons/system-shutdown.svg"
}
]
'';
config.xdg.configFile."swaylock/config".source = ./swaylock.config;
}
xdg.configFile."nwg-panel/drawer.css".source = ./nwg-panel.css;
xdg.configFile."nwg-bar/style.css".source = ./nwg-bar.css;
xdg.configFile."nwg-bar/icons".source = ./icons;
xdg.configFile."nwg-bar/bar.json".text = ''
[
{
"label": "Lock screen",
"exec": "${pkgs.swaylock-effects}/bin/swaylock -f -c 000000",
"icon": "${config.xdg.configHome}/nwg-bar/icons/system-lock-screen.svg"
},
{
"label": "Sleep",
"exec": "systemctl hybrid-sleep",
"icon": "${config.xdg.configHome}/nwg-bar/icons/system-shutdown.svg"
},
{
"label": "Logout",
"exec": "swaymsg exit",
"icon": "${config.xdg.configHome}/nwg-bar/icons/system-log-out.svg"
},
{
"label": "Reboot",
"exec": "systemctl reboot",
"icon": "${config.xdg.configHome}/nwg-bar/icons/system-reboot.svg"
},
{
"label": "Shutdown",
"exec": "systemctl -i poweroff",
"icon": "${config.xdg.configHome}/nwg-bar/icons/system-shutdown.svg"
}
]
'';
xdg.configFile."swaylock/config".source = ./swaylock.config;
};
}
}: {
config.home.sessionVariables = {
BROSWER = "firefox";
};
}: let
cfg = config.dotfiles.gui;
in
with lib; {
config = mkIf cfg.enable {
pam.sessionVariables = {
LANGUAGE = "en_US:en";
LANG = "en_US.UTF-8";
LC_NUMERIC = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_ADDRESS = "en_US.UTF-8";
LC_TELEPHONE = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
PAPERSIZE = "letter";
};
config.pam.sessionVariables = {
LANGUAGE = "en_US:en";
LANG = "en_US.UTF-8";
LC_NUMERIC = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_ADDRESS = "en_US.UTF-8";
LC_TELEPHONE = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
PAPERSIZE = "letter";
};
targets.genericLinux.enable = mkDefault false;
xdg.enable = mkDefault true;
xdg.mime.enable = mkDefault true;
config.targets.genericLinux.enable = false;
config.xdg.enable = true;
config.xdg.mime.enable = true;
# make sure all of the distro's default XDG_DATA_DIRS values are in here
config.xdg.systemDirs.data = [
"${config.home.homeDirectory}/.nix-profile/share"
"${config.home.homeDirectory}/.nix-profile/share/applications"
];
}
# make sure all of the distro's default XDG_DATA_DIRS values are in here
xdg.systemDirs.data = [
"${config.home.homeDirectory}/.nix-profile/share"
"${config.home.homeDirectory}/.nix-profile/share/applications"
];
};
}
userChrome = ''
@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);
/* hides firefox's default tab bar */
#tabbrowser-tabs {
visibility: collapse !important;
}
/* makes the treestyle tab view look cleaner */
#sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"] #sidebar-header {
display: none;
}
'';
{
config,
lib,
pkgs,
...
}: let
cfg = config.dotfiles.gui;
in
with lib; {
imports = [
./alacritty.nix
./zoom.nix
./firefox.nix
./linux_desktop.nix
./sway
];
options.dotfiles.gui = {
enable = mkEnableOption "Enables the GUI window manager and apps that I've cofnigured.";
terminal = mkOption {
type = types.str; # TODO maybe this should be a package instead, that would be nicer.
default = "${config.programs.alacritty.package}/bin/alacritty";
example = "/path/to/some/terminal/emulator/bin";
description = mdDoc "The terminal program to pass to the window manager, by default alacritty.";
};
};
options.programs = {
darktable.enable = mkEnableOption "Installs darktable.";
keepassxc.enable = mkEnableOption "Installs keepassxc.";
signal.enable = mkEnableOption "Installs signal (the messaging app).";
write-stylus.enable = mkEnableOption "Installs write_stylus.";
};
config = mkIf cfg.enable {
# these programs we enable by default if gui.enable
# but not all of the programs are (like write-stylus)
programs.alacritty.enable = mkDefault cfg.enable;
programs.darktable.enable = mkDefault cfg.enable;
programs.firefox.enable = mkDefault cfg.enable;
programs.keepassxc.enable = mkDefault cfg.enable;
programs.signal.enable = mkDefault cfg.enable;
programs.zoom.enable = mkDefault cfg.enable;
# use sway by default if gui is enabled
dotfiles.gui.sway.enable = mkDefault cfg.enable;
# this doesn't install the program but makes it so the gui app
# is installed if the program is enabled
programs.meganz.gui.enable = mkDefault cfg.enable;
# any of the programs that we're not creating config for we
# just add to home.packages
home.packages = with pkgs;
[]
++ (
if config.programs.darktable.enable
then [darktable]
else []
)
++ (
if config.programs.keepassxc.enable
then [keepassxc git-credential-keepassxc]
else []
)
++ (
if config.programs.darktable.enable
then [signal-desktop]
else []
)
++ (
if config.programs.write-stylus.enable
then [write_stylus]
else []
);
};
}
{
config,
lib,
...
}: let
xdgConfigHome = config.xdg.configHome;
cfg = config.programs.alacritty;
in {
config = with lib; {
programs.alacritty.settings = {
window.option_as_alt = "Both";
font.size = mkDefault 16;
import = [
"${xdgConfigHome}/alacritty/themes/rose-pine.yml"
];
};
# https://github.com/rose-pine/alacritty/raw/main/dist/rose-pine-moon.yml
xdg.configFile = mkIf cfg.enable {
"alacritty/themes/rose-pine.yml".source = ./themes/alacritty-rose-pine.yml;
};
};
}
{
config,
lib,
pkgs,
secrets,
...
}: let
cfg = config.dotfiles.email;
in
with lib; {
options.dotfiles.email = {
enable = mkEnableOption "enable email via mbsync";
address = mkOption {
type = types.str;
example = "email@example.com";
description = "The email address.";
};
real_name = mkOption {
type = types.str;
default = "Chris Cummings";
example = "Chris Cummings";
description = "The name associated with the email address.";
};
imap.host = mkOption {
type = types.str;
default = "imap.fastmail.com";
example = "imap.fastmail.com";
description = "the host url for imap for this email.";
};
smtp.host = mkOption {
type = types.str;
default = "smtp.fastmail.com";
example = "smtp.fastmail.com";
description = "the host url for smtp for this email.";
};
password_secret = mkOption {
type = types.path;
default = secrets.fastmail_password.path;
example = "";
description = "use rage to encrypt secret, pass it to this variable.";
};
};
config = mkIf cfg.enable {
programs.mu.enable = mkDefault cfg.enable;
programs.msmtp.enable = mkDefault cfg.enable;
programs.mbsync = {
enable = mkDefault cfg.enable;
extraConfig = ''
CopyArrivalDate yes
'';
groups = {
personal-inboxes = {
"${cfg.address}" = [];
};
};
};
services.mbsync = {
enable = mkDefault cfg.enable;
frequency = "*:0/10";
postExec = "${pkgs.mu}/bin/mu index";
};
# TODO create systemd oneshot job to run `mbsync --all`
# and mu init
# and mu index
# so new systems are auto-setup
# without having to run those commands manually
accounts.email.accounts = {
"${primaryAddress}" = {
inherit (cfg) address;
userName = cfg.address;
realName = cfg.real_name;
primary = true;
mbsync = {
enable = true;
create = "both";
expunge = "both";
remove = "both";
extraConfig.account.PipelineDepth = 50;
};
msmtp.enable = mkDefault cfg.enable;
imap.host = cfg.imap.host;
smtp.host = cfg.smtp.host;
passwordCommand = let
name = "mbsync-password-command";
in "${pkgs.writeShellApplication {
inherit name;
runtimeInputs = [pkgs.coreutils];
text = "cat ${cfg.password_secret}";
}}/bin/${name}";
};
};
};
}