diff options
-rw-r--r-- | nixos/configuration.nix | 58 |
1 files changed, 45 insertions, 13 deletions
diff --git a/nixos/configuration.nix b/nixos/configuration.nix index f3ecc8f..ba3aca4 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -354,20 +354,52 @@ }; }; - # Derived from Guix guix-daemon.service.in - # https://git.savannah.gnu.org/cgit/guix.git/tree/etc/guix-daemon.service.in?id=00c86a888488b16ce30634d3a3a9d871ed6734a2 - systemd.services.guix-daemon = { - enable = true; - description = "Build daemon for GNU Guix"; - serviceConfig = { - ExecStart = "/var/guix/profiles/per-user/root/guix-profile/bin/guix-daemon --build-users-group=guixbuild"; - Environment="GUIX_LOCPATH=/root/.guix-profile/lib/locale"; - RemainAfterExit="yes"; - StandardOutput="syslog"; - StandardError="syslog"; - TaskMax= 8192; + systemd = { + services = { + # Derived from Guix guix-daemon.service.in + # https://git.savannah.gnu.org/cgit/guix.git/tree/etc/guix-daemon.service.in?id=00c86a888488b16ce30634d3a3a9d871ed6734a2 + guix-daemon = { + enable = true; + description = "Build daemon for GNU Guix"; + serviceConfig = { + ExecStart = "/var/guix/profiles/per-user/root/guix-profile/bin/guix-daemon --build-users-group=guixbuild"; + Environment="GUIX_LOCPATH=/root/.guix-profile/lib/locale"; + RemainAfterExit="yes"; + StandardOutput="syslog"; + StandardError="syslog"; + TaskMax= "8192"; + }; + wantedBy = [ "multi-user.target" ]; + }; + + # Derived from Arch Linux Wiki: + # https://wiki.archlinux.org/index.php/Isync + mbsync-service = { + enable = true; + description = "Mailbox mbsync synchronization service"; + serviceConfig = { + Type = "oneshot"; + ExecStart= "${pkgs.isync}/bin/mbsync -Va -c /home/andreh/.mbsyncrc"; + # ExecStartPost = "~andreh/"'' + # for f in $(${pkgs.coreutils}/bin/ls /home/andreh/mbsync/); do + # ${pkgs.mu}/bin/mu index --maildir ~/mbsync/$f/; + # done + # ''; + }; + }; + }; + timers = { + mbsync-timer = { + enable = true; + description = "mbsync service timer"; + timerConfig = { + OnBootSec = "2m"; + OnUnitActiveSec = "5m"; + Unit = "mbsync-service.service"; + }; + wantedBy = [ "timers.target" ]; + }; }; - wantedBy = [ "multi-user.target" ]; }; # This value determines the NixOS release with which your system is to be |