1

update emacs

This commit is contained in:
2022-08-07 20:27:36 +02:00
parent 519b8d9e7a
commit 95e62d8525

View File

@ -28,11 +28,17 @@ in {
description = "Use the Doom Emacs framework"; description = "Use the Doom Emacs framework";
}; };
autosync = mkOption { autoSync = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
description = "Sync Doom Emacs on nixos-rebuild"; description = "Sync Doom Emacs on nixos-rebuild";
}; };
autoUpgrade = mkOption {
type = types.bool;
default = false;
description = "Automatically upgrade Doom Emacs on nixos-rebuild";
};
}; };
# Config is the merged set of all module configurations # Config is the merged set of all module configurations
@ -99,12 +105,19 @@ in {
''; '';
}) })
(mkIf (cfg.useDoom && cfg.autosync) { (mkIf (cfg.useDoom && cfg.autoSync) {
syncDoomEmacs = hm.dag.entryAfter [ "writeBoundary" "linkDoomConfig" ] '' syncDoomEmacs = hm.dag.entryAfter [ "writeBoundary" "linkDoomConfig" ] ''
${config.home.homeDirectory}/.emacs.d/bin/doom sync ${config.home.homeDirectory}/.emacs.d/bin/doom sync
''; '';
}) })
(mkIf (cfg.useDoom && cfg.autoUpgrade) {
upgradeDoomEmacs = hm.dag.entryAfter [ "writeBoundary" "linkDoomConfig" ] ''
${config.home.homeDirectory}/.emacs.d/bin/doom upgrade -!
'';
})
]); ]);
}; };
} }