Skip to content

Commit

Permalink
dev: use custom init-directory instead of XDG_CONFIG_HOME
Browse files Browse the repository at this point in the history
  • Loading branch information
terlar committed Aug 10, 2023
1 parent 13bf839 commit f1024f9
Showing 1 changed file with 9 additions and 18 deletions.
27 changes: 9 additions & 18 deletions dev/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,9 @@
rootFlake'.packages.emacsEnv
];
text = ''
XDG_CONFIG_HOME="$(mktemp -td xdg-config.XXXXXXXXXX)"
export XDG_CONFIG_HOME
mkdir -p "$XDG_CONFIG_HOME/emacs"
lndir -silent "$PWD" "$XDG_CONFIG_HOME/emacs"
ln -s "$HOME/.config/fontconfig" "$XDG_CONFIG_HOME/."
emacs "$@"
EMACS_DIR="$(mktemp -td emacs.XXXXXXXXXX)"
lndir -silent "$PWD" "$EMACS_DIR"
emacs --init-directory "$EMACS_DIR" "$@"
'';
};

Expand All @@ -122,12 +119,9 @@
rootFlake'.packages.emacsEnv
];
text = ''
XDG_CONFIG_HOME="$(mktemp -td xdg-config.XXXXXXXXXX)"
export XDG_CONFIG_HOME
mkdir -p "$XDG_CONFIG_HOME/emacs"
lndir -silent ${rootFlake'.packages.emacsConfig} "$XDG_CONFIG_HOME/emacs"
ln -s "$HOME/.config/fontconfig" "$XDG_CONFIG_HOME/."
emacs "$@"
EMACS_DIR="$(mktemp -td emacs.XXXXXXXXXX)"
lndir -silent ${rootFlake'.packages.emacsConfig} "$EMACS_DIR"
emacs --init-directory "$EMACS_DIR" "$@"
'';
};

Expand All @@ -147,12 +141,9 @@
rootFlake'.packages.emacsEnv
];
text = ''
XDG_CONFIG_HOME="$(mktemp -td xdg-config.XXXXXXXXXX)"
export XDG_CONFIG_HOME
mkdir -p "$XDG_CONFIG_HOME/emacs"
lndir -silent ${rootFlake'.packages.emacsConfig} "$XDG_CONFIG_HOME/emacs"
ln -s "$HOME/.config/fontconfig" "$XDG_CONFIG_HOME/."
emacs -fs --load ${./screenshots.el} --eval '(kill-emacs)'
EMACS_DIR="$(mktemp -td emacs.XXXXXXXXXX)"
lndir -silent ${rootFlake'.packages.emacsConfig} "$EMACS_DIR"
emacs -fs --init-directory "$EMACS_DIR" --load ${./screenshots.el} --eval '(kill-emacs)'
'';
};
};
Expand Down

0 comments on commit f1024f9

Please sign in to comment.