From 7744ecfaacc668d75ac0d4d458d95e7d549a826f Mon Sep 17 00:00:00 2001 From: Nguyễn Gia Phong Date: Thu, 10 Jun 2021 15:34:49 +0700 Subject: Set up NixOS --- .../systemd/user/default.target.wants/mbsync-legacy.timer | 1 + .../systemd/user/default.target.wants/mbsync-primary.timer | 1 + .../systemd/user/default.target.wants/redshift.service | 0 nixos/.config/systemd/user/mbsync-legacy.service | 12 ++++++++++++ nixos/.config/systemd/user/mbsync-legacy.timer | 11 +++++++++++ nixos/.config/systemd/user/mbsync-primary.service | 12 ++++++++++++ nixos/.config/systemd/user/mbsync-primary.timer | 11 +++++++++++ 7 files changed, 48 insertions(+) create mode 120000 nixos/.config/systemd/user/default.target.wants/mbsync-legacy.timer create mode 120000 nixos/.config/systemd/user/default.target.wants/mbsync-primary.timer create mode 100644 nixos/.config/systemd/user/default.target.wants/redshift.service create mode 100644 nixos/.config/systemd/user/mbsync-legacy.service create mode 100644 nixos/.config/systemd/user/mbsync-legacy.timer create mode 100644 nixos/.config/systemd/user/mbsync-primary.service create mode 100644 nixos/.config/systemd/user/mbsync-primary.timer (limited to 'nixos/.config/systemd') diff --git a/nixos/.config/systemd/user/default.target.wants/mbsync-legacy.timer b/nixos/.config/systemd/user/default.target.wants/mbsync-legacy.timer new file mode 120000 index 0000000..d6a74a0 --- /dev/null +++ b/nixos/.config/systemd/user/default.target.wants/mbsync-legacy.timer @@ -0,0 +1 @@ +/home/sea/.config/systemd/user/mbsync-legacy.timer \ No newline at end of file diff --git a/nixos/.config/systemd/user/default.target.wants/mbsync-primary.timer b/nixos/.config/systemd/user/default.target.wants/mbsync-primary.timer new file mode 120000 index 0000000..fdf6883 --- /dev/null +++ b/nixos/.config/systemd/user/default.target.wants/mbsync-primary.timer @@ -0,0 +1 @@ +/home/sea/.config/systemd/user/mbsync-primary.timer \ No newline at end of file diff --git a/nixos/.config/systemd/user/default.target.wants/redshift.service b/nixos/.config/systemd/user/default.target.wants/redshift.service new file mode 100644 index 0000000..e69de29 diff --git a/nixos/.config/systemd/user/mbsync-legacy.service b/nixos/.config/systemd/user/mbsync-legacy.service new file mode 100644 index 0000000..e0954de --- /dev/null +++ b/nixos/.config/systemd/user/mbsync-legacy.service @@ -0,0 +1,12 @@ +[Unit] +Description=Synchronize IMAP and MailDir for legacy account +Documentation=man:mbsync(1) +ConditionPathExists=%h/.mbsyncrc +After=network.target + +[Service] +ExecStart=/usr/bin/mbsync legacy +Type=oneshot + +[Install] +WantedBy=default.target diff --git a/nixos/.config/systemd/user/mbsync-legacy.timer b/nixos/.config/systemd/user/mbsync-legacy.timer new file mode 100644 index 0000000..3ea535a --- /dev/null +++ b/nixos/.config/systemd/user/mbsync-legacy.timer @@ -0,0 +1,11 @@ +[Unit] +Description=Timer for legacy accound mbsync +ConditionPathExists=%h/.mbsyncrc +After=network.target + +[Timer] +OnBootSec=1m +OnUnitInactiveSec=1m + +[Install] +WantedBy=default.target diff --git a/nixos/.config/systemd/user/mbsync-primary.service b/nixos/.config/systemd/user/mbsync-primary.service new file mode 100644 index 0000000..8ce0e6f --- /dev/null +++ b/nixos/.config/systemd/user/mbsync-primary.service @@ -0,0 +1,12 @@ +[Unit] +Description=Synchronize IMAP and MailDir for primary account +Documentation=man:mbsync(1) +ConditionPathExists=%h/.mbsyncrc +After=network.target + +[Service] +ExecStart=/usr/bin/mbsync primary +Type=oneshot + +[Install] +WantedBy=default.target diff --git a/nixos/.config/systemd/user/mbsync-primary.timer b/nixos/.config/systemd/user/mbsync-primary.timer new file mode 100644 index 0000000..a0f4151 --- /dev/null +++ b/nixos/.config/systemd/user/mbsync-primary.timer @@ -0,0 +1,11 @@ +[Unit] +Description=Timer for primary accound mbsync +ConditionPathExists=%h/.mbsyncrc +After=network.target + +[Timer] +OnBootSec=1m +OnUnitInactiveSec=1m + +[Install] +WantedBy=default.target -- cgit 1.4.1