update emacs
This commit is contained in:
@ -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 -!
|
||||||
|
'';
|
||||||
|
})
|
||||||
]);
|
]);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user