nix/services.nix

66 lines
1.5 KiB
Nix

{ config, lib, pkgs, ... }:
{
virtualisation.docker.enable = true;
virtualisation.libvirtd.enable = true;
programs.virt-manager.enable = true;
services = {
fprintd = {
enable = true;
tod.enable = true;
tod.driver = pkgs.libfprint-2-tod1-goodix;
};
syncthing = {
enable = true;
user = "joe";
dataDir = "/home/joe/sync"; # Default folder for new synced folders
configDir =
"/home/joe/sync/.config/syncthing"; # Folder for Syncthing's settings and keys
};
};
services.gnome.gnome-keyring.enable = true;
systemd.user.services.mbdirnotify = {
description = "Maildir Notifications";
enable = true;
script =
"/etc/profiles/per-user/joe/bin/mbdirnotify /home/joe/.mail/fivesigma/Inbox/new";
wantedBy = [ "multi-user.target" ];
};
systemd.user.services.protonmail-bridge = {
description = "Protonmail Bridge";
enable = true;
script =
"${pkgs.protonmail-bridge}/bin/protonmail-bridge --noninteractive --log-level info";
path = [ pkgs.gnome3.gnome-keyring ];
wantedBy = [ "multi-user.target" ];
};
# EMAIL CHECKING
systemd.timers."mail-check" = {
enable = true;
wantedBy = [ "timers.target" ];
timerConfig = {
OnBootSec = "5m";
OnUnitActiveSec = "5m";
Unit = "mail-check.service";
};
};
systemd.services."mail-check" = {
script = ''
${pkgs.isync}/bin/mbsync -a
'';
serviceConfig = {
Type = "oneshot";
User = "joe";
};
wantedBy = [ "multi-user.target" ];
};
}