From 695badd6ba11ef2fb6d64a62925cd56ffe51cff7 Mon Sep 17 00:00:00 2001 From: coolneng Date: Sun, 29 Nov 2020 20:14:56 +0100 Subject: [PATCH] Fix doom upgrade and doom purge services --- modules/periodic.nix | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/modules/periodic.nix b/modules/periodic.nix index b38ecad..6321ccd 100644 --- a/modules/periodic.nix +++ b/modules/periodic.nix @@ -6,12 +6,10 @@ systemd.user.services.doom-upgrade = { description = "Upgrade Doom Emacs"; wantedBy = [ "default.target" ]; - path = [ pkgs.emacs pkgs.git ]; - serviceConfig = { - Type = "oneshot"; - ExecStart = - "/bin/sh /home/coolneng/.emacs.d/bin/doom -y upgrade ; /bin/sh /home/coolneng/.emacs.d/bin/doom -y sync -u"; - }; + path = with pkgs; [ bash emacsGccPgtk git coreutils ]; + script = + "${pkgs.bash}/bin/bash -c '/home/coolneng/.emacs.d/bin/doom -y upgrade'"; + serviceConfig = { Type = "oneshot"; }; }; systemd.user.timers.doom-upgrade = { @@ -27,11 +25,10 @@ systemd.user.services.doom-purge = { description = "Purge Doom Emacs"; wantedBy = [ "default.target" ]; - path = [ pkgs.emacs ]; - serviceConfig = { - Type = "oneshot"; - ExecStart = "/bin/sh /home/coolneng/.emacs.d/bin/doom purge"; - }; + path = with pkgs; [ bash emacsGccPgtk git coreutils ]; + script = + "${pkgs.bash}/bin/bash -c '/home/coolneng/.emacs.d/bin/doom -y purge'"; + serviceConfig = { Type = "oneshot"; }; }; systemd.user.timers.doom-purge = {