2020-02-23 23:29:32 +01:00
|
|
|
{ pkgs, depot, ... }:
|
2020-01-06 15:58:22 +01:00
|
|
|
|
|
|
|
let
|
2020-02-23 23:29:32 +01:00
|
|
|
utils = import <briefcase/utils>;
|
2020-02-06 23:23:09 +01:00
|
|
|
# NOTE: I'm trying to keep the list of dependencies herein constrained to a
|
|
|
|
# list of generic dependencies (i.e. not project or language specific). For
|
|
|
|
# language-specific tooling, I'm intending to use shell.nix alongside lorri
|
|
|
|
# and direnv.
|
Remove assertions that prelude/executable-exists?
I'm in the midst of transitioning onto a few new tools.
My previous workflow just used `nix-env` to install *some* packages. I didn't
have a prescribed methodology for which packages I would install using `nix-env`
and which ones I would install using `sudo apt-get install`. Sometimes if a
package would be available in my aptitude repositories, I'd use that; other
times when it wasn't available I'd use `nix-env`. One complication about being
on gLinux intead of NixOS is that some packages (e.g. nixpkgs.terminator) is
available via `nix-env -iA nixpkgs.terminator`, but the installation won't
actually run on my gLinux. In these instances, I would install terminator from
the aptitude repositories.
Then @tazjin introduced me to his Emacs configuration that he builds using
Nix. What appealed to me about his built Emacs is that it worked as expected on
either a NixOS machine and on gLinux (and presumably on other non-NixOS machines
as well).
A setup towards which I'm working is to own one or a few NixOS machines whose
configurations are entirely managed with Nix. On devices like my work machines,
which cannot run NixOS, I can build as much of the software that I need using
Nix and attempt to minimize the ad hoc configuration either with shell scripts,
python, golang, or more Nix code... it's clear that I still don't have a clear
idea of how that part will work.
For now, I'm adopting nix, nix-env, lorri, direnv, and weening off of aptitude
as much as I can. Things are a bit messy, but my general trend feels
positive. Stay tuned for more updates.
2020-02-06 22:44:26 +01:00
|
|
|
emacsBinPath = pkgs.lib.strings.makeBinPath (with pkgs; [
|
2020-02-06 23:23:09 +01:00
|
|
|
tdesktop # native telegram client
|
|
|
|
ripgrep
|
|
|
|
gitAndTools.hub
|
|
|
|
kubectl
|
|
|
|
google-cloud-sdk
|
|
|
|
xsv
|
Remove assertions that prelude/executable-exists?
I'm in the midst of transitioning onto a few new tools.
My previous workflow just used `nix-env` to install *some* packages. I didn't
have a prescribed methodology for which packages I would install using `nix-env`
and which ones I would install using `sudo apt-get install`. Sometimes if a
package would be available in my aptitude repositories, I'd use that; other
times when it wasn't available I'd use `nix-env`. One complication about being
on gLinux intead of NixOS is that some packages (e.g. nixpkgs.terminator) is
available via `nix-env -iA nixpkgs.terminator`, but the installation won't
actually run on my gLinux. In these instances, I would install terminator from
the aptitude repositories.
Then @tazjin introduced me to his Emacs configuration that he builds using
Nix. What appealed to me about his built Emacs is that it worked as expected on
either a NixOS machine and on gLinux (and presumably on other non-NixOS machines
as well).
A setup towards which I'm working is to own one or a few NixOS machines whose
configurations are entirely managed with Nix. On devices like my work machines,
which cannot run NixOS, I can build as much of the software that I need using
Nix and attempt to minimize the ad hoc configuration either with shell scripts,
python, golang, or more Nix code... it's clear that I still don't have a clear
idea of how that part will work.
For now, I'm adopting nix, nix-env, lorri, direnv, and weening off of aptitude
as much as I can. Things are a bit messy, but my general trend feels
positive. Stay tuned for more updates.
2020-02-06 22:44:26 +01:00
|
|
|
scrot
|
|
|
|
clipmenu
|
|
|
|
]);
|
2020-01-06 15:58:22 +01:00
|
|
|
emacsWithPackages = (pkgs.emacsPackagesNgGen pkgs.emacs26).emacsWithPackages;
|
|
|
|
wpcarrosEmacs = emacsWithPackages (epkgs:
|
|
|
|
(with epkgs.elpaPackages; [
|
|
|
|
exwm
|
|
|
|
]) ++
|
|
|
|
|
|
|
|
(with epkgs.melpaPackages; [
|
2020-02-10 12:34:19 +01:00
|
|
|
ts
|
2020-02-08 17:00:31 +01:00
|
|
|
vterm
|
2020-01-06 15:58:22 +01:00
|
|
|
base16-theme
|
|
|
|
ivy-pass
|
|
|
|
clipmon # TODO: Prefer an Emacs client for clipmenud.
|
|
|
|
protobuf-mode # TODO: Determine if this is coming from google-emacs.
|
2020-01-30 17:00:29 +01:00
|
|
|
# docker
|
2020-01-06 15:58:22 +01:00
|
|
|
evil
|
|
|
|
evil-collection
|
|
|
|
evil-magit
|
|
|
|
evil-commentary
|
|
|
|
evil-surround
|
|
|
|
key-chord
|
|
|
|
add-node-modules-path # TODO: Assess whether or not I need this with Nix.
|
|
|
|
web-mode
|
|
|
|
rjsx-mode
|
|
|
|
tide
|
|
|
|
prettier-js
|
|
|
|
flycheck
|
|
|
|
diminish
|
|
|
|
doom-themes
|
2020-02-27 12:42:45 +01:00
|
|
|
doom-modeline
|
2020-01-06 15:58:22 +01:00
|
|
|
neotree # TODO: Remove this dependency from my config.
|
|
|
|
which-key
|
|
|
|
ivy
|
2020-01-31 13:45:48 +01:00
|
|
|
restclient
|
|
|
|
package-lint
|
|
|
|
parsec
|
|
|
|
magit-popup
|
|
|
|
direnv
|
|
|
|
emr
|
2020-01-06 15:58:22 +01:00
|
|
|
ivy-prescient
|
|
|
|
all-the-icons
|
|
|
|
all-the-icons-ivy
|
|
|
|
alert
|
|
|
|
nix-mode
|
|
|
|
racer
|
|
|
|
rust-mode
|
|
|
|
rainbow-delimiters
|
|
|
|
racket-mode
|
|
|
|
lispyville
|
|
|
|
elisp-slime-nav
|
|
|
|
py-yapf
|
|
|
|
reason-mode
|
|
|
|
elixir-mode
|
2020-02-05 18:55:38 +01:00
|
|
|
go-mode
|
2020-01-06 15:58:22 +01:00
|
|
|
company
|
|
|
|
markdown-mode
|
|
|
|
refine
|
|
|
|
deferred
|
|
|
|
magit
|
|
|
|
request
|
|
|
|
pcre2el
|
|
|
|
helpful
|
|
|
|
exec-path-from-shell # TODO: Determine if Nix solves this problem.
|
|
|
|
yasnippet
|
|
|
|
projectile
|
|
|
|
deadgrep
|
|
|
|
counsel
|
|
|
|
counsel-projectile
|
|
|
|
engine-mode # TODO: Learn what this is.
|
|
|
|
eglot
|
|
|
|
dap-mode
|
|
|
|
lsp-ui
|
|
|
|
company-lsp
|
|
|
|
suggest
|
|
|
|
paradox
|
2020-01-30 17:00:29 +01:00
|
|
|
# emr
|
2020-01-06 15:58:22 +01:00
|
|
|
flymake-shellcheck
|
|
|
|
fish-mode
|
|
|
|
tuareg
|
|
|
|
haskell-mode
|
|
|
|
lsp-haskell
|
|
|
|
use-package
|
|
|
|
general
|
|
|
|
clojure-mode
|
|
|
|
cider
|
|
|
|
f
|
|
|
|
dash
|
|
|
|
company
|
|
|
|
counsel
|
|
|
|
flycheck
|
|
|
|
ivy
|
|
|
|
magit
|
|
|
|
]) ++
|
|
|
|
|
2020-01-30 17:00:29 +01:00
|
|
|
(with depot.tools.emacs-pkgs; [
|
2020-01-06 15:58:22 +01:00
|
|
|
dottime
|
|
|
|
]));
|
|
|
|
|
|
|
|
# TODO: Do I need `pkgs.lib.fix`?
|
|
|
|
in pkgs.lib.fix(self: l: f: pkgs.writeShellScriptBin "wpcarros-emacs" ''
|
2020-01-30 17:00:29 +01:00
|
|
|
# TODO: Is this the best way to handle environment variables using Nix?
|
|
|
|
export BRIEFCASE=$HOME/briefcase
|
|
|
|
export DEPOT=$HOME/depot
|
|
|
|
|
2020-01-06 15:58:22 +01:00
|
|
|
export PATH="${emacsBinPath}:$PATH"
|
|
|
|
exec ${wpcarrosEmacs}/bin/emacs \
|
|
|
|
--debug-init \
|
|
|
|
--no-site-file \
|
|
|
|
--no-site-lisp \
|
2020-01-30 17:00:29 +01:00
|
|
|
--directory ${ ./.emacs.d/vendor } \
|
|
|
|
--directory ${ ./.emacs.d/wpc } \
|
|
|
|
--load ${ ./.emacs.d/wpc/wpc-package.el } \
|
|
|
|
--load ${ ./.emacs.d/init.el } \
|
2020-01-06 15:58:22 +01:00
|
|
|
--no-init-file $@
|
|
|
|
'' // {
|
|
|
|
# TODO: Ascertain whether I need this.
|
|
|
|
overrideEmacs = f': self l f';
|
|
|
|
|
|
|
|
# Call with a local.el file containing local system configuration.
|
|
|
|
withLocalConfig = confDir: self confDir f;
|
|
|
|
|
2020-01-30 17:00:29 +01:00
|
|
|
# This accepts the path to an Emacs binary outside of /nix/store. On gLinux,
|
|
|
|
# this will ensure that X and GL linkage behaves as expected.
|
2020-01-06 15:58:22 +01:00
|
|
|
withLocalEmacs = emacsBin: pkgs.writeShellScriptBin "wpcarros-emacs" ''
|
2020-01-30 17:00:29 +01:00
|
|
|
# TODO: Is this the best way to handle environment variables using Nix?
|
|
|
|
export BRIEFCASE=$HOME/briefcase
|
|
|
|
export DEPOT=$HOME/depot
|
|
|
|
|
2020-01-06 15:58:22 +01:00
|
|
|
export PATH="${emacsBinPath}:$PATH"
|
|
|
|
export EMACSLOADPATH="${wpcarrosEmacs.deps}/share/emacs/site-lisp:"
|
|
|
|
exec ${emacsBin} \
|
|
|
|
--debug-init \
|
|
|
|
--no-site-file \
|
|
|
|
--no-site-lisp \
|
2020-01-30 17:00:29 +01:00
|
|
|
--directory ${ ./.emacs.d/vendor } \
|
|
|
|
--directory ${ ./.emacs.d/wpc } \
|
|
|
|
--load ${ ./.emacs.d/wpc/wpc-package.el } \
|
|
|
|
--load ${ ./.emacs.d/init.el } \
|
2020-01-06 15:58:22 +01:00
|
|
|
--no-init-file $@
|
|
|
|
'';
|
2020-01-30 17:00:29 +01:00
|
|
|
}) null utils.identity
|