summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--home/config/emacs.nix22
1 files changed, 15 insertions, 7 deletions
diff --git a/home/config/emacs.nix b/home/config/emacs.nix
index 4bb1143..50fd213 100644
--- a/home/config/emacs.nix
+++ b/home/config/emacs.nix
@@ -2,10 +2,20 @@
let
cfg = config.programs.emacs;
- spacemacs-update-script = pkgs.writeShellScript "spacemacs-update" ''
- ${pkgs.git}/bin/git pull
- ${cfg.package}/bin/emacsclient --eval '(configuration-layer/update-packages "no-confirmation")'
- '';
+ spacemacs-update-script = pkgs.callPackage ({ emacs, git }:
+ pkgs.writeShellApplication {
+ name = "spacemacs-update";
+
+ runtimeInputs = [ emacs git ];
+
+ text = ''
+ git checkout develop
+ git pull
+ git checkout local
+ git merge develop
+ emacsclient --eval '(configuration-layer/update-packages "no-confirmation")'
+ '';
+ }) { emacs = cfg.package; };
in {
programs.emacs = {
enable = true;
@@ -36,8 +46,6 @@ in {
Persistent = true;
OnCalendar = "daily";
};
- Install = {
- WantedBy = [ "default.target" ];
- };
+ Install = { WantedBy = [ "default.target" ]; };
});
}