This commit is contained in:
Andrea Ciceri 2023-02-12 18:24:04 +01:00
parent 3a60ed192d
commit 394208f8e7
No known key found for this signature in database
GPG key ID: A1FC89532D1C5654
6 changed files with 90 additions and 19 deletions

View file

@ -1,7 +1,8 @@
{self, inputs, ...}: {
flake.overlays.default = self: super: {
ccrEmacs = self.packages.${self.system}.ccrEmacs;
};
{
self,
inputs,
...
}: {
flake.hmModules = {
default = self.hmModules.ccrEmacs;
ccrEmacs = {
@ -22,9 +23,9 @@
ccrEmacsConfig = config.ccrEmacs;
in
lib.mkIf ccrEmacsConfig.enable {
nixpkgs.overlays = [(self: super: {
ccrEmacs = super.hello;
})];
nixpkgs.overlays = [
inputs.emacs-overlay.overlays.default
];
programs.emacs = {
enable = true;
package = ccrEmacsConfig.package;
@ -62,13 +63,13 @@
]);
home.activation = {
cloneCcrEmacsFlake = lib.hm.dag.entryAfter ["writeBoundary"] ''
PATH=$PATH:${lib.makeBinPath (with pkgs; [ git openssh ])}
if [ ! -d "$HOME/.config/emacs" ]; then
$DRY_RUN_CMD git clone \
https://github.com/aciceri/emacs.git \
"$HOME/.config/emacs"
ln -s "$HOME/.config/emacs" "$HOME/emacs"
fi
PATH=$PATH:${lib.makeBinPath (with pkgs; [git openssh])}
if [ ! -d "$HOME/.config/emacs" ]; then
$DRY_RUN_CMD git clone \
https://github.com/aciceri/emacs.git \
"$HOME/.config/emacs"
ln -s "$HOME/.config/emacs" "$HOME/emacs"
fi
'';
};
};