summaryrefslogtreecommitdiff
path: root/home
diff options
context:
space:
mode:
authorQuentin Aristote <quentin@aristote.fr>2023-02-26 12:04:18 +0100
committerQuentin Aristote <quentin@aristote.fr>2023-02-26 12:04:18 +0100
commit15abfa1bf197dc23943e637f26d13bb06bb9db56 (patch)
tree2dfd0fba0956be83168d84bb7fbeafbecda95273 /home
parentfe2ba2460b1115b432f17ed7ec3f1ad09f8ecc3c (diff)
fix spacemacs update script to integrate local branch
Diffstat (limited to 'home')
-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" ]; };
});
}