Browse Source

Add clojure environment

main
parent
commit
b663bb03c8
Signed by: chris GPG Key ID: 3025DCBD46F81C0F
  1. 42
      README.org
  2. 2
      modules/emacs.nix
  3. 11
      shells/clojure.nix

42
README.org

@ -420,6 +420,26 @@ mkShell {
} }
#+END_SRC #+END_SRC
** Clojure
[[https://clojure.org][Clojure]] is a dynamic and functional dialect of the Lisp programming language on the Java platform. Like other dialects, Clojure treats code as data and has a Lisp macro system. The current development process is community driven.
Import this shell with ~nix-shell /etc/dotfiles/shells/clojure.nix~.
#+BEGIN_SRC nix :noweb yes :tangle shells/clojure.nix
# <<file-warning>>
{ pkgs ? import <nixpkgs> { } }:
with pkgs;
mkShell {
buildInputs = [
leiningen
];
shellHook = ''
'';
}
#+END_SRC
* Host Configurations * Host Configurations
[[https://nixos.org/][NixOS]] typically stores the current machine configuration in =/etc/nixos/configuration.nix=. In this project, this file is stored in =/etc/dotfiles/hosts/$HOSTNAME/...=, and imported, along with the generated hardware configurations. This ensures that multiple host machines can share the same modules, and generating new host definitions is trivial. It also makes it easier to share common configurations amongst all of the hosts, such as with pre-configured wireless networking: [[https://nixos.org/][NixOS]] typically stores the current machine configuration in =/etc/nixos/configuration.nix=. In this project, this file is stored in =/etc/dotfiles/hosts/$HOSTNAME/...=, and imported, along with the generated hardware configurations. This ensures that multiple host machines can share the same modules, and generating new host definitions is trivial. It also makes it easier to share common configurations amongst all of the hosts, such as with pre-configured wireless networking:
@ -1083,6 +1103,7 @@ let
<<emacs-golang-package>> <<emacs-golang-package>>
<<emacs-python-package>> <<emacs-python-package>>
<<emacs-rustic-package>> <<emacs-rustic-package>>
<<emacs-clojure-package>>
<<emacs-plantuml-package>> <<emacs-plantuml-package>>
<<emacs-protobuf-package>> <<emacs-protobuf-package>>
@ -1160,6 +1181,7 @@ When Emacs is started, it normally tries to load a Lisp program from an ititiali
<<emacs-golang-elisp>> <<emacs-golang-elisp>>
<<emacs-python-elisp>> <<emacs-python-elisp>>
<<emacs-rustic-elisp>> <<emacs-rustic-elisp>>
<<emacs-clojure-elisp>>
<<emacs-plantuml-elisp>> <<emacs-plantuml-elisp>>
<<emacs-desktop-elisp>> <<emacs-desktop-elisp>>
@ -2410,6 +2432,26 @@ The built in [[https://emacswiki.org/emacs/PythonProgrammingInEmacs][Python Mode
epkgs.protobuf-mode epkgs.protobuf-mode
#+END_SRC #+END_SRC
** Clojure Environment
#+NAME: emacs-clojure-package
#+BEGIN_SRC nix
epkgs.clojure-mode
epkgs.cider
#+END_SRC
[[https://github.com/clojure-emacs/clojure-mode][Clojure Mode]] is an Emacs major mode that provides font-lock (syntax highlighting), indentation, navigation, and refactoring support for the [[https://clojure.org][Clojure]] programming language.
https://github.com/clojure-emacs/cider extends Emacs with support for interactive programming in Clojure. The features are centered around =cider-mode=, adding a running process for compilation, code completion, debugging, definition and documentation lookup, running tests, and more.
#+NAME: emacs-clojure-elisp
#+BEGIN_SRC emacs-lisp
;; Configure `clojure-mode' and `cider'.
(add-hook 'clojure-mode-hook 'lsp)
(add-hook 'clojurescript-mode-hook 'lsp)
(add-hook 'clojurec-mode-hook 'lso)
#+END_SRC
** PlantUML ** PlantUML
#+NAME: emacs-plantuml-extras #+NAME: emacs-plantuml-extras

2
modules/emacs.nix

@ -52,6 +52,8 @@ let
epkgs.go-mode epkgs.go-mode
epkgs.pretty-mode epkgs.pretty-mode
epkgs.rustic epkgs.rustic
epkgs.clojure-mode
epkgs.cider
epkgs.plantuml-mode epkgs.plantuml-mode
epkgs.protobuf-mode epkgs.protobuf-mode

11
shells/clojure.nix

@ -0,0 +1,11 @@
# This file is controlled by /etc/dotfiles/README.org
{ pkgs ? import <nixpkgs> { } }:
with pkgs;
mkShell {
buildInputs = [
leiningen
];
shellHook = ''
'';
}
Loading…
Cancel
Save